@dxos/react-ui-animation 0.0.0-stage → 0.0.0

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.
Files changed (40) hide show
  1. package/LICENSE +105 -0
  2. package/dist/lib/index.mjs +306 -0
  3. package/dist/lib/index.mjs.map +1 -0
  4. package/dist/px-icons/anthropic.svg +12 -0
  5. package/dist/px-icons/bar-high.svg +21 -0
  6. package/dist/px-icons/bar-low.svg +18 -0
  7. package/dist/px-icons/bar-medium.svg +20 -0
  8. package/dist/px-icons/circle.svg +5 -0
  9. package/dist/px-icons/context-panel.svg +6 -0
  10. package/dist/px-icons/deepseek.svg +10 -0
  11. package/dist/types/src/components/TimelineBar/TimelineBar.d.ts +38 -0
  12. package/dist/types/src/components/TimelineBar/TimelineBar.d.ts.map +1 -0
  13. package/dist/types/src/components/TimelineBar/TimelineBar.stories.d.ts +23 -0
  14. package/dist/types/src/components/TimelineBar/TimelineBar.stories.d.ts.map +1 -0
  15. package/dist/types/src/components/TimelineBar/TimelineBar.test.d.ts +2 -0
  16. package/dist/types/src/components/TimelineBar/TimelineBar.test.d.ts.map +1 -0
  17. package/dist/types/src/components/TimelineBar/index.d.ts +2 -0
  18. package/dist/types/src/components/TimelineBar/index.d.ts.map +1 -0
  19. package/dist/types/src/components/index.d.ts +2 -0
  20. package/dist/types/src/components/index.d.ts.map +1 -0
  21. package/dist/types/src/hooks/index.d.ts +3 -0
  22. package/dist/types/src/hooks/index.d.ts.map +1 -0
  23. package/dist/types/src/hooks/useClock.d.ts +13 -0
  24. package/dist/types/src/hooks/useClock.d.ts.map +1 -0
  25. package/dist/types/src/hooks/useExposedClock.d.ts +10 -0
  26. package/dist/types/src/hooks/useExposedClock.d.ts.map +1 -0
  27. package/dist/types/src/index.d.ts +3 -0
  28. package/dist/types/src/index.d.ts.map +1 -0
  29. package/dist/types/tsconfig.tsbuildinfo +1 -0
  30. package/package.json +49 -3
  31. package/src/components/TimelineBar/TimelineBar.stories.tsx +200 -0
  32. package/src/components/TimelineBar/TimelineBar.test.ts +20 -0
  33. package/src/components/TimelineBar/TimelineBar.tsx +288 -0
  34. package/src/components/TimelineBar/index.ts +5 -0
  35. package/src/components/index.ts +5 -0
  36. package/src/hooks/index.ts +6 -0
  37. package/src/hooks/useClock.ts +56 -0
  38. package/src/hooks/useExposedClock.ts +35 -0
  39. package/src/index.ts +6 -0
  40. package/README.md +0 -3
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TimelineBar.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimelineBar.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/TimelineBar/TimelineBar.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './TimelineBar.tsx';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/TimelineBar/index.ts"],"names":[],"mappings":"AAIA,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './TimelineBar/index.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAIA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './useClock.ts';
2
+ export * from './useExposedClock.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type Clock } from '@dxos/animation';
2
+ export type UseClockOptions = {
3
+ /** Seconds; playback stops (or wraps) there. Unbounded when unset or zero. */
4
+ duration?: number;
5
+ loop?: boolean;
6
+ };
7
+ /**
8
+ * A clock's one animation loop (react-ui-canvas ANIMATION.md §5.1): while the clock plays, each frame advances its
9
+ * time by the wall time since the last, capped at `MAX_CLOCK_STEP`. The first frame after a start advances nothing, so
10
+ * no step is ever negative. Reading the wall clock is this hook's alone; everything animated reads the clock's time.
11
+ */
12
+ export declare const useClock: (clock: Clock, { duration, loop }?: UseClockOptions) => void;
13
+ //# sourceMappingURL=useClock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClock.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useClock.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,KAAK,EAAkB,MAAM,iBAAiB,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,UAAW,KAAK,uBAAkC,eAAe,KAAQ,IAkC7F,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type * as Registry from 'effect/reactivity/AtomRegistry';
2
+ import { type Clock, type Timeline } from '@dxos/animation';
3
+ /** What a frame renderer exports: the clock's length and rate. */
4
+ export type ExposedSpan = Pick<Timeline, 'duration' | 'fps'>;
5
+ /**
6
+ * Publishes a clock for a frame renderer, which seeks the clock rather than faking the browser's
7
+ * (react-ui-canvas ANIMATION.md §7.2); `exportable` off, nothing is published.
8
+ */
9
+ export declare const useExposedClock: (registry: Registry.AtomRegistry, clock: Clock, span: ExposedSpan | undefined, exportable: boolean | undefined) => void;
10
+ //# sourceMappingURL=useExposedClock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExposedClock.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useExposedClock.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,QAAQ,MAAM,gCAAgC,CAAC;AAGhE,OAAO,EAAE,KAAK,KAAK,EAAe,KAAK,QAAQ,EAAe,MAAM,iBAAiB,CAAC;AAEtF,kEAAkE;AAClE,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,KAAK,CAAC,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,eAAe,aAChB,QAAQ,CAAC,YAAY,SACxB,KAAK,QACN,WAAW,GAAG,SAAS,cACjB,OAAO,GAAG,SAAS,SAchC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './components/index.ts';
2
+ export * from './hooks/index.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC"}