@aceshooting/lyra-ui 0.1.4 → 0.1.5

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.
@@ -46,6 +46,12 @@ export class LyraPlayback extends LyraElement {
46
46
  willUpdate(changed) {
47
47
  if (changed.has('hidden') && this.hidden)
48
48
  this.pause();
49
+ // If length is externally reduced to <= 1 while playing, the timer would
50
+ // otherwise keep firing forever — and the play button (the only control
51
+ // that could stop it) becomes ?disabled at that point, leaving no way to
52
+ // stop it from the rendered UI.
53
+ if (changed.has('length') && this.length <= 1)
54
+ this.pause();
49
55
  }
50
56
  /** Start playback; no-op if there's nothing to advance through. */
51
57
  play() {
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ type Story = StoryObj;
5
+ export declare const Gallery: Story;
@@ -0,0 +1,16 @@
1
+ import { html } from 'lit';
2
+ const meta = {
3
+ title: 'Stat',
4
+ component: 'lyra-stat',
5
+ tags: ['autodocs'],
6
+ };
7
+ export default meta;
8
+ export const Gallery = {
9
+ render: () => html `
10
+ <div style="display:flex; gap:1rem; flex-wrap:wrap;">
11
+ <lyra-stat label="Revenue" value="12.4" unit="k€" trend="3.2" variant="success"></lyra-stat>
12
+ <lyra-stat label="Errors" value="128" trend="-5.1" variant="danger"></lyra-stat>
13
+ <lyra-stat label="Sessions" value="9,204"></lyra-stat>
14
+ </div>
15
+ `,
16
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aceshooting/lyra-ui",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Free, clean-room Lit web components — a companion to Web Awesome.",
5
5
  "license": "MIT",
6
6
  "type": "module",