@operato/board 10.29.111 → 10.29.112

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.
@@ -25,6 +25,11 @@ export declare class BoardViewer extends LitElement {
25
25
  from: Date;
26
26
  to: Date;
27
27
  };
28
+ /**
29
+ * A moment, epoch milliseconds, the board's light and weather show (ADR-0263 stage 7) -- an app's time cursor, a twin
30
+ * going back in time. Not saved. While the playback plays, its time is shown; none, the board's own.
31
+ */
32
+ vibeTime?: number;
28
33
  private _playbackState;
29
34
  private _playbackActive;
30
35
  private _playbackSpeed;
@@ -55,6 +60,12 @@ export declare class BoardViewer extends LitElement {
55
60
  private get _vibeLayer();
56
61
  private _onToggleDaySimulation;
57
62
  private _stopDaySimulation;
63
+ private _vibeShown?;
64
+ /**
65
+ * Shows the board's vibe at the playback's time while it plays, else at `vibeTime`, fixed and not saved; with
66
+ * neither, the board's own. Only a board with a vibe; a simulated day goes on until it is stopped.
67
+ */
68
+ private _showVibeTime;
58
69
  get _is3dMode(): boolean;
59
70
  _fullscreen: HTMLElement;
60
71
  _fabGroup: HTMLElement;
@@ -95,6 +95,31 @@ let BoardViewer = class BoardViewer extends LitElement {
95
95
  this._simulating = false;
96
96
  this._simulatedAt = '';
97
97
  (_b = (_a = this._vibeLayer) === null || _a === void 0 ? void 0 : _a.previewVibe) === null || _b === void 0 ? void 0 : _b.call(_a, undefined);
98
+ this._vibeShown = undefined;
99
+ this._showVibeTime();
100
+ }
101
+ /**
102
+ * Shows the board's vibe at the playback's time while it plays, else at `vibeTime`, fixed and not saved; with
103
+ * neither, the board's own. Only a board with a vibe; a simulated day goes on until it is stopped.
104
+ */
105
+ _showVibeTime() {
106
+ var _a;
107
+ if (this._simulating)
108
+ return;
109
+ const layer = this._vibeLayer;
110
+ if (!(layer === null || layer === void 0 ? void 0 : layer.previewVibe))
111
+ return;
112
+ const played = this._playbackCurrentTime ? Date.parse(this._playbackCurrentTime) : NaN;
113
+ const time = Number.isFinite(played) ? played : Number.isFinite(this.vibeTime) ? this.vibeTime : undefined;
114
+ const minute = time === undefined ? undefined : Math.floor(time / 60000);
115
+ if (minute === this._vibeShown)
116
+ return;
117
+ this._vibeShown = minute;
118
+ const own = (_a = layer.state) === null || _a === void 0 ? void 0 : _a.vibe;
119
+ if (time === undefined || !own || typeof own !== 'object' || own.enabled === false)
120
+ return layer.previewVibe(undefined);
121
+ const { enabled, ...rest } = own;
122
+ layer.previewVibe({ ...rest, mode: 'fixed', time });
98
123
  }
99
124
  get _is3dMode() {
100
125
  var _a, _b, _c;
@@ -243,6 +268,8 @@ let BoardViewer = class BoardViewer extends LitElement {
243
268
  if (changes.has('data') && this._scene && this.data) {
244
269
  this._scene.data = this.data;
245
270
  }
271
+ if (changes.has('vibeTime'))
272
+ this._showVibeTime();
246
273
  if (changes.has('values') && this._scene && this.values) {
247
274
  this._scene.values = this.values;
248
275
  }
@@ -312,6 +339,8 @@ let BoardViewer = class BoardViewer extends LitElement {
312
339
  setupScene({ id, scene }, history) {
313
340
  var _a;
314
341
  this._scene = scene;
342
+ this._vibeShown = undefined;
343
+ this._showVibeTime();
315
344
  // 2D 모드: model-layer의 fillStyle을 호스트 배경색으로 설정하여 경계를 자연스럽게 함
316
345
  // 3D 모드: 3D 공간에서 여백 개념이 없으므로 배경색 설정 불필요
317
346
  const backgroundColor = (_a = this._scene) === null || _a === void 0 ? void 0 : _a.root.state.fillStyle;
@@ -671,6 +700,7 @@ let BoardViewer = class BoardViewer extends LitElement {
671
700
  this._playbackState = status.state;
672
701
  this._playbackSpeed = status.speed;
673
702
  this._playbackCurrentTime = status.currentTime;
703
+ this._showVibeTime();
674
704
  });
675
705
  // provider 교체 및 재구독
676
706
  rootContainer.app.dataSubscriptionProvider = this._playbackProvider;
@@ -695,6 +725,7 @@ let BoardViewer = class BoardViewer extends LitElement {
695
725
  this._playbackState = 'idle';
696
726
  this._playbackCurrentTime = '';
697
727
  this._playbackSpeed = 1;
728
+ this._showVibeTime();
698
729
  }
699
730
  /**
700
731
  * 모든 tag 컴포넌트의 기존 구독을 해제한다.
@@ -952,6 +983,9 @@ __decorate([
952
983
  __decorate([
953
984
  property({ type: Object, attribute: 'playback-time-range' })
954
985
  ], BoardViewer.prototype, "playbackTimeRange", void 0);
986
+ __decorate([
987
+ property({ type: Number, attribute: false })
988
+ ], BoardViewer.prototype, "vibeTime", void 0);
955
989
  __decorate([
956
990
  state()
957
991
  ], BoardViewer.prototype, "_playbackState", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@operato/board",
3
- "version": "10.29.111",
3
+ "version": "10.29.112",
4
4
  "description": "Webcomponent for board following open-wc recommendations",
5
5
  "author": "heartyoh",
6
6
  "type": "module",
@@ -152,7 +152,7 @@
152
152
  "@operato/markdown": "^10.29.83",
153
153
  "@operato/popup": "^10.29.96",
154
154
  "@operato/property-editor": "^10.29.110",
155
- "@operato/property-panel": "^10.29.110",
155
+ "@operato/property-panel": "^10.29.112",
156
156
  "@operato/styles": "^10.29.83",
157
157
  "@operato/utils": "^10.29.85",
158
158
  "@types/file-saver": "^2.0.4",
@@ -167,7 +167,7 @@
167
167
  "@custom-elements-manifest/analyzer": "^0.10.0",
168
168
  "@hatiolab/figure-model": "^0.12.20",
169
169
  "@hatiolab/prettier-config": "^1.0.0",
170
- "@hatiolab/things-scene": "^10.1.145",
170
+ "@hatiolab/things-scene": "^10.1.146",
171
171
  "@open-wc/eslint-config": "^12.0.3",
172
172
  "@open-wc/testing": "^4.0.0",
173
173
  "@rollup/plugin-image": "^3.0.3",
@@ -203,5 +203,5 @@
203
203
  "prettier --write"
204
204
  ]
205
205
  },
206
- "gitHead": "3688a300ee361aa6570605c95d69fba1bdd978f4"
206
+ "gitHead": "77b2b9455472659823fe2358442239fce358256c"
207
207
  }