@operato/scene-clock 1.2.36 → 1.2.46

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,24 @@
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.46](https://github.com/things-scene/operato-scene/compare/v1.2.45...v1.2.46) (2023-06-10)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * typescript build options ([3eb0d7f](https://github.com/things-scene/operato-scene/commit/3eb0d7fd80e2c3cea698501aa1d9d54903423a7b))
12
+
13
+
14
+
15
+ ## [1.2.45](https://github.com/things-scene/operato-scene/compare/v1.2.44...v1.2.45) (2023-06-09)
16
+
17
+
18
+ ### :bug: Bug Fix
19
+
20
+ * set => setState, get => getState for whole scene component ([c205db4](https://github.com/things-scene/operato-scene/commit/c205db4c7bfa5c6dd7d34ea82af283d83b551bad))
21
+
22
+
23
+
6
24
  ## [1.2.36](https://github.com/things-scene/operato-scene/compare/v1.2.35...v1.2.36) (2023-05-13)
7
25
 
8
26
 
@@ -131,10 +131,10 @@ export default class ClockAnalog extends Ellipse {
131
131
  ctx.beginPath();
132
132
  ctx.scale(1, rx / ry);
133
133
  ctx.translate(-cx, -cy);
134
- var timeOut = setTimeout(function (self) {
135
- self.invalidate();
134
+ var timeOut = setTimeout(() => {
135
+ this.invalidate();
136
136
  clearTimeout(timeOut);
137
- }, 1000, this);
137
+ }, 1000);
138
138
  }
139
139
  get nature() {
140
140
  return NATURE;
@@ -1 +1 @@
1
- {"version":3,"file":"clock-analog.js","sourceRoot":"","sources":["../src/clock-analog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAmB,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAE5E,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;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YAChC,GAAG,CAAC,IAAI,EAAE,CAAA;SACX;QAED,GAAG,CAAC,SAAS,EAAE,CAAA;QAEf,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAA;QACrB,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAA;QAEvB,IAAI,OAAO,GAAmB,UAAU,CACtC,UAAU,IAAI;YACZ,IAAI,CAAC,UAAU,EAAE,CAAA;YACjB,YAAY,CAAC,OAAO,CAAC,CAAA;QACvB,CAAC,EACD,IAAI,EACJ,IAAI,CACL,CAAA;IACH,CAAC;IAED,IAAI,MAAM;QACR,OAAO,MAAM,CAAA;IACf,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, ComponentNature, Ellipse } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'number',\n label: 'hour-width',\n name: 'hourWidth',\n property: 'hourWidth'\n },\n {\n type: 'number',\n label: 'minute-width',\n name: 'minuteWidth',\n property: 'minuteWidth'\n },\n {\n type: 'number',\n label: 'second-width',\n name: 'secondWidth',\n property: 'secondWidth'\n },\n {\n type: 'checkbox',\n label: 'needle-round',\n name: 'needleRound',\n property: 'needleRound'\n },\n {\n type: 'checkbox',\n label: 'show-second',\n name: 'showSecond',\n property: 'showSecond'\n },\n {\n type: 'checkbox',\n label: 'show-number',\n name: 'showNumber',\n property: 'showNumber'\n },\n {\n type: 'number',\n label: 'inner-circle-size',\n name: 'innerCircleSize',\n property: 'innerCircleSize'\n },\n {\n type: 'color',\n label: 'inner-circle-color',\n name: 'innerCircleColor',\n property: 'innerCircleColor'\n }\n ],\n help: 'scene/component/analog-clock'\n}\n\nfunction drawHand(ctx: CanvasRenderingContext2D, pos: number, length: number, rx: number, needleRound: boolean) {\n ctx.beginPath()\n ctx.lineWidth = rx\n ctx.lineCap = needleRound ? 'round' : 'square'\n ctx.moveTo(0, 0)\n ctx.rotate(pos)\n ctx.lineTo(0, -length)\n ctx.stroke()\n ctx.rotate(-pos)\n}\n\nexport default class ClockAnalog extends Ellipse {\n is3dish() {\n return false\n }\n\n _draw(ctx: CanvasRenderingContext2D) {\n var {\n cx,\n cy,\n rx,\n ry,\n fillStyle,\n strokeStyle,\n fontColor = '#000',\n lineWidth,\n hourWidth,\n minuteWidth,\n secondWidth,\n needleRound = false,\n showSecond = true,\n showNumber = true,\n innerCircleSize = 5,\n innerCircleColor = '#000'\n } = this.state\n\n // 시계 원 그리기.\n ctx.beginPath()\n ctx.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, 0, 2 * Math.PI)\n\n ctx.fillStyle = fillStyle\n\n ctx.strokeStyle = strokeStyle\n ctx.lineWidth = lineWidth || rx * 0.1\n this.drawFill(ctx)\n this.drawStroke(ctx)\n\n ctx.beginPath()\n ctx.translate(cx, cy)\n ctx.scale(1, ry / rx)\n\n // 시계 숫자 그리기\n if (showNumber) {\n var ang\n var num\n ctx.font = rx * 0.15 + 'px arial'\n ctx.textBaseline = 'middle'\n ctx.textAlign = 'center'\n ctx.fillStyle = fontColor\n\n for (num = 1; num < 13; num++) {\n ang = (num * Math.PI) / 6\n ctx.rotate(ang)\n ctx.translate(0, -rx * 0.85)\n ctx.rotate(-ang)\n ctx.fillText(num.toString(), 0, 0)\n ctx.rotate(ang)\n ctx.translate(0, rx * 0.85)\n ctx.rotate(-ang)\n }\n }\n\n // 시계 침 그리기\n var now = new Date()\n var hour = now.getHours()\n var minute = now.getMinutes()\n var second = now.getSeconds()\n\n // hour needle\n hour = hour % 12\n hour = (hour * Math.PI) / 6 + (minute * Math.PI) / (6 * 60) + (second * Math.PI) / (360 * 60)\n\n drawHand(ctx, hour, rx * 0.55, hourWidth || rx * 0.07, needleRound)\n\n // minute needle\n minute = (minute * Math.PI) / 30 + (second * Math.PI) / (30 * 60)\n drawHand(ctx, minute, rx * 0.8, minuteWidth || rx * 0.07, needleRound)\n\n // second needle\n if (showSecond) {\n second = (second * Math.PI) / 30\n drawHand(ctx, second, rx * 0.9, secondWidth || rx * 0.02, needleRound)\n }\n\n ctx.beginPath()\n\n // Inner Circle\n if (innerCircleSize) {\n ctx.ellipse(0, 0, innerCircleSize, innerCircleSize, 0, 0, 2 * Math.PI)\n ctx.fillStyle = innerCircleColor\n ctx.fill()\n }\n\n ctx.beginPath()\n\n ctx.scale(1, rx / ry)\n ctx.translate(-cx, -cy)\n\n var timeOut: NodeJS.Timeout = setTimeout(\n function (self) {\n self.invalidate()\n clearTimeout(timeOut)\n },\n 1000,\n this\n )\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('clock-analog', ClockAnalog)\n"]}
1
+ {"version":3,"file":"clock-analog.js","sourceRoot":"","sources":["../src/clock-analog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAmB,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAE5E,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,YAAY;YACnB,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,WAAW;SACtB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,aAAa;SACxB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,aAAa;SACxB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,aAAa;SACxB;QACD;YACE,IAAI,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E,WAAW,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport { Component, ComponentNature, Ellipse } from '@hatiolab/things-scene'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'number',\n label: 'hour-width',\n name: 'hourWidth',\n property: 'hourWidth'\n },\n {\n type: 'number',\n label: 'minute-width',\n name: 'minuteWidth',\n property: 'minuteWidth'\n },\n {\n type: 'number',\n label: 'second-width',\n name: 'secondWidth',\n property: 'secondWidth'\n },\n {\n type: 'checkbox',\n label: 'needle-round',\n name: 'needleRound',\n property: 'needleRound'\n },\n {\n type: 'checkbox',\n label: 'show-second',\n name: 'showSecond',\n property: 'showSecond'\n },\n {\n type: 'checkbox',\n label: 'show-number',\n name: 'showNumber',\n property: 'showNumber'\n },\n {\n type: 'number',\n label: 'inner-circle-size',\n name: 'innerCircleSize',\n property: 'innerCircleSize'\n },\n {\n type: 'color',\n label: 'inner-circle-color',\n name: 'innerCircleColor',\n property: 'innerCircleColor'\n }\n ],\n help: 'scene/component/analog-clock'\n}\n\nfunction drawHand(ctx: CanvasRenderingContext2D, pos: number, length: number, rx: number, needleRound: boolean) {\n ctx.beginPath()\n ctx.lineWidth = rx\n ctx.lineCap = needleRound ? 'round' : 'square'\n ctx.moveTo(0, 0)\n ctx.rotate(pos)\n ctx.lineTo(0, -length)\n ctx.stroke()\n ctx.rotate(-pos)\n}\n\nexport default class ClockAnalog extends Ellipse {\n is3dish() {\n return false\n }\n\n _draw(ctx: CanvasRenderingContext2D) {\n var {\n cx,\n cy,\n rx,\n ry,\n fillStyle,\n strokeStyle,\n fontColor = '#000',\n lineWidth,\n hourWidth,\n minuteWidth,\n secondWidth,\n needleRound = false,\n showSecond = true,\n showNumber = true,\n innerCircleSize = 5,\n innerCircleColor = '#000'\n } = this.state\n\n // 시계 원 그리기.\n ctx.beginPath()\n ctx.ellipse(cx, cy, Math.abs(rx), Math.abs(ry), 0, 0, 2 * Math.PI)\n\n ctx.fillStyle = fillStyle\n\n ctx.strokeStyle = strokeStyle\n ctx.lineWidth = lineWidth || rx * 0.1\n this.drawFill(ctx)\n this.drawStroke(ctx)\n\n ctx.beginPath()\n ctx.translate(cx, cy)\n ctx.scale(1, ry / rx)\n\n // 시계 숫자 그리기\n if (showNumber) {\n var ang\n var num\n ctx.font = rx * 0.15 + 'px arial'\n ctx.textBaseline = 'middle'\n ctx.textAlign = 'center'\n ctx.fillStyle = fontColor\n\n for (num = 1; num < 13; num++) {\n ang = (num * Math.PI) / 6\n ctx.rotate(ang)\n ctx.translate(0, -rx * 0.85)\n ctx.rotate(-ang)\n ctx.fillText(num.toString(), 0, 0)\n ctx.rotate(ang)\n ctx.translate(0, rx * 0.85)\n ctx.rotate(-ang)\n }\n }\n\n // 시계 침 그리기\n var now = new Date()\n var hour = now.getHours()\n var minute = now.getMinutes()\n var second = now.getSeconds()\n\n // hour needle\n hour = hour % 12\n hour = (hour * Math.PI) / 6 + (minute * Math.PI) / (6 * 60) + (second * Math.PI) / (360 * 60)\n\n drawHand(ctx, hour, rx * 0.55, hourWidth || rx * 0.07, needleRound)\n\n // minute needle\n minute = (minute * Math.PI) / 30 + (second * Math.PI) / (30 * 60)\n drawHand(ctx, minute, rx * 0.8, minuteWidth || rx * 0.07, needleRound)\n\n // second needle\n if (showSecond) {\n second = (second * Math.PI) / 30\n drawHand(ctx, second, rx * 0.9, secondWidth || rx * 0.02, needleRound)\n }\n\n ctx.beginPath()\n\n // Inner Circle\n if (innerCircleSize) {\n ctx.ellipse(0, 0, innerCircleSize, innerCircleSize, 0, 0, 2 * Math.PI)\n ctx.fillStyle = innerCircleColor\n ctx.fill()\n }\n\n ctx.beginPath()\n\n ctx.scale(1, rx / ry)\n ctx.translate(-cx, -cy)\n\n var timeOut: number = setTimeout(() => {\n this.invalidate()\n clearTimeout(timeOut)\n }, 1000)\n }\n\n get nature() {\n return NATURE\n }\n}\n\nComponent.register('clock-analog', ClockAnalog)\n"]}
@@ -72,17 +72,17 @@ export default class ClockText extends Text {
72
72
  });
73
73
  }
74
74
  _timer() {
75
- this.set('data', this._getTimeStamp());
75
+ this.setState('data', this._getTimeStamp());
76
76
  }
77
77
  _getTimeStamp() {
78
78
  var d = dayjs();
79
- var utc = this.get('utc');
80
- var formatStr = this.get('timeFormat') || 'YYYY-MM-DD HH:mm:ss';
81
- var week_lang = this.get('weekLanguage');
82
- if (!this.get('weekLanguage')) {
79
+ var utc = this.getState('utc');
80
+ var formatStr = this.getState('timeFormat') || 'YYYY-MM-DD HH:mm:ss';
81
+ var week_lang = this.getState('weekLanguage');
82
+ if (!this.getState('weekLanguage')) {
83
83
  week_lang = 'en';
84
84
  }
85
- if (this.get('localTime')) {
85
+ if (this.getState('localTime')) {
86
86
  return d.local().locale(week_lang).format(formatStr);
87
87
  }
88
88
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"clock-text.js","sourceRoot":"","sources":["../src/clock-text.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,qBAAqB,CAAA;AAC5B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,qBAAqB,CAAA;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAA;AACnC,OAAO,GAAG,MAAM,sBAAsB,CAAA;AAEtC,OAAO,EAAE,SAAS,EAAmB,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAEzE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAEjB,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,aAAa;YACpB,IAAI,EAAE,YAAY;SACnB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,WAAW;SAClB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,KAAK;YACZ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IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;YAC7B,SAAS,GAAG,IAAI,CAAA;SACjB;QACD,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;YACzB,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;SACrD;aAAM;YACL,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;SAC1E;IACH,CAAC;IAED,OAAO;QACL,KAAK,CAAC,OAAO,EAAE,CAAA;QACf,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5D,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport 'dayjs/esm/locale/ko'\nimport 'dayjs/esm/locale/zh-cn'\nimport 'dayjs/esm/locale/ja'\n\nimport dayjs from 'dayjs/esm/index'\nimport utc from 'dayjs/esm/plugin/utc'\n\nimport { Component, ComponentNature, Text } from '@hatiolab/things-scene'\n\ndayjs.extend(utc)\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'time-format',\n name: 'timeFormat'\n },\n {\n type: 'checkbox',\n label: 'is-local-time',\n name: 'localTime'\n },\n {\n type: 'number',\n label: 'utc',\n name: 'utc'\n },\n {\n type: 'select',\n label: 'week-language',\n name: 'weekLanguage',\n property: {\n options: [\n {\n display: 'English',\n value: 'en'\n },\n {\n display: 'Korean',\n value: 'ko'\n },\n {\n display: 'Chinese',\n value: 'zh-cn'\n },\n {\n display: 'Japanese',\n value: 'ja'\n }\n ]\n }\n }\n ],\n help: 'scene/component/clock-text'\n}\n\nexport default class ClockText extends Text {\n private _raf?: number\n\n is3dish() {\n return false\n }\n\n get nature() {\n return NATURE\n }\n\n render(ctx: CanvasRenderingContext2D) {\n super.render(ctx)\n\n this._raf = requestAnimationFrame(() => {\n setTimeout(() => {\n this._timer()\n }, 1000)\n })\n }\n\n _timer() {\n this.set('data', this._getTimeStamp())\n }\n\n _getTimeStamp() {\n var d = dayjs()\n\n var utc = this.get('utc')\n var formatStr = this.get('timeFormat') || 'YYYY-MM-DD HH:mm:ss'\n var week_lang = this.get('weekLanguage')\n if (!this.get('weekLanguage')) {\n week_lang = 'en'\n }\n if (this.get('localTime')) {\n return d.local().locale(week_lang).format(formatStr)\n } else {\n return d.utc().utcOffset(Number(utc)).locale(week_lang).format(formatStr)\n }\n }\n\n dispose() {\n super.dispose()\n this._raf !== undefined && cancelAnimationFrame(this._raf)\n }\n}\n\nComponent.register('clock-text', ClockText)\n"]}
1
+ {"version":3,"file":"clock-text.js","sourceRoot":"","sources":["../src/clock-text.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,qBAAqB,CAAA;AAC5B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,qBAAqB,CAAA;AAE5B,OAAO,KAAK,MAAM,iBAAiB,CAAA;AACnC,OAAO,GAAG,MAAM,sBAAsB,CAAA;AAEtC,OAAO,EAAE,SAAS,EAAmB,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAEzE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;AAEjB,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,aAAa;YACpB,IAAI,EAAE,YAAY;SACnB;QACD;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE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;QACpE,IAAI,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAA;QAC7C,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;YAClC,SAAS,GAAG,IAAI,CAAA;SACjB;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;YAC9B,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;SACrD;aAAM;YACL,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;SAC1E;IACH,CAAC;IAED,OAAO;QACL,KAAK,CAAC,OAAO,EAAE,CAAA;QACf,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC5D,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA","sourcesContent":["/*\n * Copyright © HatioLab Inc. All rights reserved.\n */\n\nimport 'dayjs/esm/locale/ko'\nimport 'dayjs/esm/locale/zh-cn'\nimport 'dayjs/esm/locale/ja'\n\nimport dayjs from 'dayjs/esm/index'\nimport utc from 'dayjs/esm/plugin/utc'\n\nimport { Component, ComponentNature, Text } from '@hatiolab/things-scene'\n\ndayjs.extend(utc)\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'time-format',\n name: 'timeFormat'\n },\n {\n type: 'checkbox',\n label: 'is-local-time',\n name: 'localTime'\n },\n {\n type: 'number',\n label: 'utc',\n name: 'utc'\n },\n {\n type: 'select',\n label: 'week-language',\n name: 'weekLanguage',\n property: {\n options: [\n {\n display: 'English',\n value: 'en'\n },\n {\n display: 'Korean',\n value: 'ko'\n },\n {\n display: 'Chinese',\n value: 'zh-cn'\n },\n {\n display: 'Japanese',\n value: 'ja'\n }\n ]\n }\n }\n ],\n help: 'scene/component/clock-text'\n}\n\nexport default class ClockText extends Text {\n private _raf?: number\n\n is3dish() {\n return false\n }\n\n get nature() {\n return NATURE\n }\n\n render(ctx: CanvasRenderingContext2D) {\n super.render(ctx)\n\n this._raf = requestAnimationFrame(() => {\n setTimeout(() => {\n this._timer()\n }, 1000)\n })\n }\n\n _timer() {\n this.setState('data', this._getTimeStamp())\n }\n\n _getTimeStamp() {\n var d = dayjs()\n\n var utc = this.getState('utc')\n var formatStr = this.getState('timeFormat') || 'YYYY-MM-DD HH:mm:ss'\n var week_lang = this.getState('weekLanguage')\n if (!this.getState('weekLanguage')) {\n week_lang = 'en'\n }\n if (this.getState('localTime')) {\n return d.local().locale(week_lang).format(formatStr)\n } else {\n return d.utc().utcOffset(Number(utc)).locale(week_lang).format(formatStr)\n }\n }\n\n dispose() {\n super.dispose()\n this._raf !== undefined && cancelAnimationFrame(this._raf)\n }\n}\n\nComponent.register('clock-text', ClockText)\n"]}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/scene-clock",
3
3
  "description": "Clock component for things-scene",
4
4
  "author": "heartyoh",
5
- "version": "1.2.36",
5
+ "version": "1.2.46",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
8
8
  "license": "MIT",
@@ -58,5 +58,5 @@
58
58
  "prettier --write"
59
59
  ]
60
60
  },
61
- "gitHead": "65a40a190365b3b6256409b6491af360e36d1a98"
61
+ "gitHead": "1642231c4a8e50b20f520fad3ac3e00ebf7fe8d8"
62
62
  }
@@ -169,14 +169,10 @@ export default class ClockAnalog extends Ellipse {
169
169
  ctx.scale(1, rx / ry)
170
170
  ctx.translate(-cx, -cy)
171
171
 
172
- var timeOut: NodeJS.Timeout = setTimeout(
173
- function (self) {
174
- self.invalidate()
175
- clearTimeout(timeOut)
176
- },
177
- 1000,
178
- this
179
- )
172
+ var timeOut: number = setTimeout(() => {
173
+ this.invalidate()
174
+ clearTimeout(timeOut)
175
+ }, 1000)
180
176
  }
181
177
 
182
178
  get nature() {
package/src/clock-text.ts CHANGED
@@ -84,19 +84,19 @@ export default class ClockText extends Text {
84
84
  }
85
85
 
86
86
  _timer() {
87
- this.set('data', this._getTimeStamp())
87
+ this.setState('data', this._getTimeStamp())
88
88
  }
89
89
 
90
90
  _getTimeStamp() {
91
91
  var d = dayjs()
92
92
 
93
- var utc = this.get('utc')
94
- var formatStr = this.get('timeFormat') || 'YYYY-MM-DD HH:mm:ss'
95
- var week_lang = this.get('weekLanguage')
96
- if (!this.get('weekLanguage')) {
93
+ var utc = this.getState('utc')
94
+ var formatStr = this.getState('timeFormat') || 'YYYY-MM-DD HH:mm:ss'
95
+ var week_lang = this.getState('weekLanguage')
96
+ if (!this.getState('weekLanguage')) {
97
97
  week_lang = 'en'
98
98
  }
99
- if (this.get('localTime')) {
99
+ if (this.getState('localTime')) {
100
100
  return d.local().locale(week_lang).format(formatStr)
101
101
  } else {
102
102
  return d.utc().utcOffset(Number(utc)).locale(week_lang).format(formatStr)
package/tsconfig.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "module": "esnext",
5
5
  "moduleResolution": "node",
6
6
  "noEmitOnError": true,
7
- "lib": ["es2017", "dom"],
7
+ "lib": ["es2019", "dom"],
8
8
  "strict": true,
9
9
  "esModuleInterop": false,
10
10
  "allowSyntheticDefaultImports": true,
@@ -17,7 +17,7 @@
17
17
  "declaration": true,
18
18
  "incremental": true,
19
19
  "typeRoots": ["./node_modules"],
20
- "types": ["node"]
20
+ "types": []
21
21
  },
22
22
  "include": ["**/*.ts", "*.d.ts"]
23
23
  }
@@ -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/clock-analog.ts","../../node_modules/dayjs/esm/locale/types.d.ts","../../node_modules/dayjs/esm/locale/index.d.ts","../../node_modules/dayjs/esm/index.d.ts","../../node_modules/dayjs/esm/plugin/utc/index.d.ts","./src/clock-text.ts","./src/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":"773d2d98df7df57d9b6497595bfa58ad46c4c6dac142763441051ef84c32e306","signature":"ae549990b4266cbc372160735edd364543e030e8c9aa7db66ff1df2cd83b9951"},{"version":"73a0ee6395819b063df4b148211985f2e1442945c1a057204cf4cf6281760dc3","affectsGlobalScope":true},"7f0717e1c516c7b6b6acbc2177d1bd910a5d1abb757c85182ca8d089c9b6e398","09d906c1aeb34304755b072698e6728d3e83ed0b6366cf82e695f7a0f078564e","6003f9a303f96bd4a2cd982c29430db84325c390a926c3d2c3ed5845c42f9e42",{"version":"8d70b7014cbad0f9feecea7b35ba9acfc5a460467aa057967576fed8378ece29","signature":"ef7dc95584215a5d7f18b3ebada9942d5f0f9650b7e657fdf6213e831c80e5ba"},{"version":"b5f3990e4772b6dec5d08b892adc6858148dc5f47b6c8a539748860585f116a1","signature":"0a1db33e5734384e5150151be7886c6cc400c7e7e84ca68048967683e3f1e278"},"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,52,53],"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":[[100],[54,100],[57,100],[58,63,91,100],[59,70,71,78,88,99,100],[59,60,70,78,100],[61,100],[62,63,71,79,100],[63,88,96,100],[64,66,70,78,100],[65,100],[66,67,100],[70,100],[68,70,100],[70,71,72,88,99,100],[70,71,72,85,88,91,100],[100,104],[66,70,73,78,88,99,100],[70,71,73,74,78,88,96,99,100],[73,75,88,96,99,100],[54,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],[70,76,100],[77,99,100],[66,70,78,88,100],[79,100],[80,100],[57,81,100],[82,98,100,104],[83,100],[84,100],[70,85,86,100],[85,87,100,102],[58,70,88,89,90,91,100],[58,88,90,100],[88,89,100],[91,100],[92,100],[88,100],[70,94,95,100],[94,95,100],[63,78,88,96,100],[97,100],[78,98,100],[58,73,84,99,100],[63,100],[88,100,101],[100,102],[100,103],[58,63,70,72,81,88,99,100,102,104],[88,100,105],[49,100],[48,100],[50,100],[45,46,100],[45,46,49,50,51,100],[45,47,52,100],[46],[46,49],[47,52]],"referencedMap":[[46,1],[54,2],[55,2],[57,3],[58,4],[59,5],[60,6],[61,7],[62,8],[63,9],[64,10],[65,11],[66,12],[67,12],[69,13],[68,14],[70,13],[71,15],[72,16],[56,17],[106,1],[73,18],[74,19],[75,20],[107,21],[76,22],[77,23],[78,24],[79,25],[80,26],[81,27],[82,28],[83,29],[84,30],[85,31],[86,31],[87,32],[88,33],[90,34],[89,35],[91,36],[92,37],[93,38],[94,39],[95,40],[96,41],[97,42],[98,43],[99,44],[100,45],[101,46],[102,47],[103,48],[104,49],[105,50],[50,51],[49,52],[48,1],[51,53],[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],[47,54],[52,55],[53,56]],"exportedModulesMap":[[46,1],[54,2],[55,2],[57,3],[58,4],[59,5],[60,6],[61,7],[62,8],[63,9],[64,10],[65,11],[66,12],[67,12],[69,13],[68,14],[70,13],[71,15],[72,16],[56,17],[106,1],[73,18],[74,19],[75,20],[107,21],[76,22],[77,23],[78,24],[79,25],[80,26],[81,27],[82,28],[83,29],[84,30],[85,31],[86,31],[87,32],[88,33],[90,34],[89,35],[91,36],[92,37],[93,38],[94,39],[95,40],[96,41],[97,42],[98,43],[99,44],[100,45],[101,46],[102,47],[103,48],[104,49],[105,50],[50,51],[49,52],[48,1],[51,53],[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],[47,57],[52,58],[53,59]],"semanticDiagnosticsPerFile":[46,54,55,57,58,59,60,61,62,63,64,65,66,67,69,68,70,71,72,56,106,73,74,75,107,76,77,78,79,80,81,82,83,84,85,86,87,88,90,89,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,50,49,48,51,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,47,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.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.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/clock-analog.ts","../../node_modules/dayjs/esm/locale/types.d.ts","../../node_modules/dayjs/esm/locale/index.d.ts","../../node_modules/dayjs/esm/index.d.ts","../../node_modules/dayjs/esm/plugin/utc/index.d.ts","./src/clock-text.ts","./src/index.ts"],"fileInfos":[{"version":"f59215c5f1d886b05395ee7aca73e0ac69ddfad2843aa88530e797879d511bad","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7",{"version":"3dda5344576193a4ae48b8d03f105c86f20b2f2aff0a1d1fd7935f5d68649654","affectsGlobalScope":true},{"version":"9d9885c728913c1d16e0d2831b40341d6ad9a0ceecaabc55209b306ad9c736a5","affectsGlobalScope":true},{"version":"17bea081b9c0541f39dd1ae9bc8c78bdd561879a682e60e2f25f688c0ecab248","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":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"f1c9fe42b65437a61104e601eb298c5c859fb522b483f1bdb700eed67a16f980","1ec425c4c916d3a75b0557409a967eb5fee869beb69eefc2fbbf563f92bda771",{"version":"e52fd04521328e49f56a94f62ff8935443328aae90076d0060abd258a0ef77e2","signature":"ae549990b4266cbc372160735edd364543e030e8c9aa7db66ff1df2cd83b9951"},{"version":"73a0ee6395819b063df4b148211985f2e1442945c1a057204cf4cf6281760dc3","affectsGlobalScope":true},"7f0717e1c516c7b6b6acbc2177d1bd910a5d1abb757c85182ca8d089c9b6e398","ccff6a039925da0bbddce77e8fe06865bb4bc144f8ca2f729b4390015044183b","6003f9a303f96bd4a2cd982c29430db84325c390a926c3d2c3ed5845c42f9e42",{"version":"475a03b67fe9c2dee83f76878bbe0ae82c255036e28a22f468f8b2d5666add8a","signature":"ef7dc95584215a5d7f18b3ebada9942d5f0f9650b7e657fdf6213e831c80e5ba"},{"version":"b5f3990e4772b6dec5d08b892adc6858148dc5f47b6c8a539748860585f116a1","signature":"0a1db33e5734384e5150151be7886c6cc400c7e7e84ca68048967683e3f1e278"}],"root":[37,42,43],"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":[[39],[38],[40],[35,36],[35,36,39,40,41],[35,37,42],[36],[36,39],[37,42]],"referencedMap":[[40,1],[39,2],[41,3],[37,4],[42,5],[43,6]],"exportedModulesMap":[[40,1],[39,2],[41,3],[37,7],[42,8],[43,9]],"semanticDiagnosticsPerFile":[36,40,39,38,41,35,33,34,7,9,8,2,10,11,12,13,14,15,16,17,3,4,21,18,19,20,22,23,24,5,25,26,27,28,6,32,29,30,31,1,37,42,43]},"version":"5.1.3"}