strata-react 1.0.7 → 1.0.10

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.
@@ -58,6 +58,16 @@ export declare function createFormat(locale: string, options?: FormatOptions): {
58
58
  * (null, negative, not finite) prints the placeholder. Set it in `tabular-nums`.
59
59
  */
60
60
  runningTime: (seconds: number | null | undefined) => string;
61
+ /**
62
+ * A position in media as an editor shows it, to a chosen precision: "4:05" (seconds), "4:05.250"
63
+ * (`"ms"`), or "4:05:07" (`"frames"` at `fps`, the last part the frame). Hours appear only from
64
+ * one hour. Floors, never rounds up, so a time never reads ahead of the picture. Unknown
65
+ * (null, negative, not finite) prints the placeholder. Set it in `tabular-nums`.
66
+ */
67
+ timecode: (seconds: number | null | undefined, { precision, fps }?: {
68
+ precision?: "seconds" | "ms" | "frames";
69
+ fps?: number;
70
+ }) => string;
61
71
  /** What a missing value prints as: an en dash unless `createFormat`'s `missing` says otherwise. */
62
72
  missing: string;
63
73
  /** A time of day: `format.clock(at)` is "06:05". */
@@ -119,6 +129,16 @@ export declare const format: {
119
129
  * (null, negative, not finite) prints the placeholder. Set it in `tabular-nums`.
120
130
  */
121
131
  runningTime: (seconds: number | null | undefined) => string;
132
+ /**
133
+ * A position in media as an editor shows it, to a chosen precision: "4:05" (seconds), "4:05.250"
134
+ * (`"ms"`), or "4:05:07" (`"frames"` at `fps`, the last part the frame). Hours appear only from
135
+ * one hour. Floors, never rounds up, so a time never reads ahead of the picture. Unknown
136
+ * (null, negative, not finite) prints the placeholder. Set it in `tabular-nums`.
137
+ */
138
+ timecode: (seconds: number | null | undefined, { precision, fps }?: {
139
+ precision?: "seconds" | "ms" | "frames";
140
+ fps?: number;
141
+ }) => string;
122
142
  /** What a missing value prints as: an en dash unless `createFormat`'s `missing` says otherwise. */
123
143
  missing: string;
124
144
  /** A time of day: `format.clock(at)` is "06:05". */
@@ -0,0 +1,14 @@
1
+ /** The smallest step whose ticks are at least `minGapPx` apart at this zoom, so labels thin out instead of colliding. */
2
+ export declare function tickStep(pxPerUnit: number, minGapPx?: number): number;
3
+ /** Tick times from `from` to `to` inclusive, on multiples of `step`. */
4
+ export declare function ticksBetween(from: number, to: number, step: number): number[];
5
+ /** A tick's label: m:ss, h:mm:ss, with tenths or hundredths when the step is under a second. */
6
+ export declare function tickLabel(time: number, step: number): string;
7
+ export declare function clamp(value: number, min: number, max: number): number;
8
+ /** The point to snap `time` to: the nearest of `points` within `thresholdPx` at this zoom, or `null`. */
9
+ export declare function snapTo(time: number, points: readonly number[], pxPerUnit: number, thresholdPx?: number): {
10
+ time: number;
11
+ point: number;
12
+ } | null;
13
+ /** Round away float noise from adding steps (0.1 + 0.2). */
14
+ export declare const tidy: (n: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strata-react",
3
- "version": "1.0.7",
3
+ "version": "1.0.10",
4
4
  "description": "React + Tailwind v4 components that ship structure, behaviour, states and a token contract, and no look: each product brings a theme generated from its own subject.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -103,7 +103,9 @@
103
103
  "lucide-react": "^1.72.0",
104
104
  "pixelmatch": "^8.0.0",
105
105
  "pngjs": "^7.0.0",
106
+ "react-aria": "^3.53.1",
106
107
  "react-aria-components": "^1.22.1",
108
+ "react-stately": "^3.51.0",
107
109
  "tailwind-merge": "^3.3.0",
108
110
  "tailwindcss-react-aria-components": "^2.2.0"
109
111
  },