@fusion.dev/helix 0.199.0 → 0.199.1

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.
@@ -155063,6 +155063,13 @@
155063
155063
  "readonly": true,
155064
155064
  "description": "Stops the dots for a shape the page slotted, and starts them again once it is gone."
155065
155065
  },
155066
+ {
155067
+ "kind": "field",
155068
+ "name": "handleRestyle",
155069
+ "privacy": "private",
155070
+ "readonly": true,
155071
+ "description": "**One frame for a still orb, once a color the canvas carries has moved**,\nas Strands and Aura draw one. A running orb reads the colors on its next\nframe, but one drawn once, under reduced motion or with its loop stopped,\nkept the ink of the theme it was drawn in: after a switch to dark, dark\ndots on a dark ground."
155072
+ },
155066
155073
  {
155067
155074
  "kind": "method",
155068
155075
  "name": "start",
@@ -267716,6 +267723,6 @@
267716
267723
  ],
267717
267724
  "helix": {
267718
267725
  "package": "@fusion.dev/helix",
267719
- "version": "0.199.0"
267726
+ "version": "0.199.1"
267720
267727
  }
267721
267728
  }
@@ -1,2 +1,2 @@
1
1
  import { createSheet } from '@fusion.dev/helix-core';
2
- export const styles = createSheet(`:host {--_orb-size: calc(var(--helix-size-loader-lg) * 1.5);--_orb-color: var(--orb-color, currentColor);--_orb-ground: var(--orb-ground, var(--helix-color-background));block-size: var(--orb-size, var(--_orb-size));display: inline-block;flex-shrink: 0;inline-size: var(--orb-size, var(--_orb-size));position: relative;vertical-align: middle}::slotted(*) {block-size: 100%;inline-size: 100%;inset: 0;position: absolute}:host([size="sm"]) {--_orb-size: var(--helix-size-loader-md)}:host([size="lg"]) {--_orb-size: calc(var(--helix-size-loader-lg) * 2)}[part="canvas"] {animation-iteration-count: var(--orb-speed, 1);block-size: 100%;color: var(--_orb-color);display: block;inline-size: 100%;text-decoration-color: var(--_orb-ground)}[part="canvas"][hidden] {display: none}@media print {:host {display: none}}`);
2
+ export const styles = createSheet(`:host {--_orb-size: calc(var(--helix-size-loader-lg) * 1.5);--_orb-color: var(--orb-color, currentColor);--_orb-ground: var(--orb-ground, var(--helix-color-background));block-size: var(--orb-size, var(--_orb-size));display: inline-block;flex-shrink: 0;inline-size: var(--orb-size, var(--_orb-size));position: relative;vertical-align: middle}::slotted(*) {block-size: 100%;inline-size: 100%;inset: 0;position: absolute}:host([size="sm"]) {--_orb-size: var(--helix-size-loader-md)}:host([size="lg"]) {--_orb-size: calc(var(--helix-size-loader-lg) * 2)}[part="canvas"] {animation-iteration-count: var(--orb-speed, 1);block-size: 100%;color: var(--_orb-color);display: block;inline-size: 100%;text-decoration-color: var(--_orb-ground);transition-duration: var(--helix-duration-fast);transition-property: color, text-decoration-color}[part="canvas"][hidden] {display: none}@media print {:host {display: none}}`);
@@ -203,6 +203,14 @@ export declare class HelixOrb extends HelixElement {
203
203
  protected firstUpdated(changed: PropertyValues): void;
204
204
  connectedCallback(): void;
205
205
  disconnectedCallback(): void;
206
+ /**
207
+ * **One frame for a still orb, once a color the canvas carries has moved**,
208
+ * as Strands and Aura draw one. A running orb reads the colors on its next
209
+ * frame, but one drawn once, under reduced motion or with its loop stopped,
210
+ * kept the ink of the theme it was drawn in: after a switch to dark, dark
211
+ * dots on a dark ground.
212
+ */
213
+ private readonly handleRestyle;
206
214
  private start;
207
215
  /**
208
216
  * Matches the drawing buffer to the box, and reports whether it changed.
@@ -63,6 +63,11 @@ let HelixOrb = class HelixOrb extends HelixElement {
63
63
  this.gate.play();
64
64
  }
65
65
  };
66
+ this.handleRestyle = () => {
67
+ if (!this.gate.running) {
68
+ this.paint(0);
69
+ }
70
+ };
66
71
  this.handleLost = () => {
67
72
  this.lost = true;
68
73
  this.gate.stop();
@@ -125,6 +130,7 @@ let HelixOrb = class HelixOrb extends HelixElement {
125
130
  this.box = 0;
126
131
  this.canvas?.removeEventListener('contextlost', this.handleLost);
127
132
  this.canvas?.removeEventListener('contextrestored', this.handleRestored);
133
+ this.canvas?.removeEventListener('transitionend', this.handleRestyle);
128
134
  }
129
135
  start() {
130
136
  if (!this.isConnected) {
@@ -143,6 +149,7 @@ let HelixOrb = class HelixOrb extends HelixElement {
143
149
  }
144
150
  canvas.addEventListener('contextlost', this.handleLost);
145
151
  canvas.addEventListener('contextrestored', this.handleRestored);
152
+ canvas.addEventListener('transitionend', this.handleRestyle);
146
153
  if (this.lost && !this.context.isContextLost()) {
147
154
  this.lost = false;
148
155
  canvas.toggleAttribute('hidden', this.own);