@opentui/react 0.0.0-20260812-897d859a → 0.0.0-20260820-e69cf0cc

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.
@@ -168,7 +168,7 @@ import { ImageRenderable as ImageRenderable2, TextNodeRenderable as TextNodeRend
168
168
  // package.json
169
169
  var package_default = {
170
170
  name: "@opentui/react",
171
- version: "0.0.0-20260812-897d859a",
171
+ version: "0.0.0-20260820-e69cf0cc",
172
172
  description: "React renderer for building terminal user interfaces using OpenTUI core",
173
173
  license: "MIT",
174
174
  repository: {
package/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  getComponentCatalogue,
12
12
  jsxDEV,
13
13
  useAppContext
14
- } from "./chunk-xrgyn3gx.js";
14
+ } from "./chunk-3keq30kf.js";
15
15
  import"./chunk-2mx7fq49.js";
16
16
  // src/hooks/use-blur.ts
17
17
  import { useEffect } from "react";
@@ -132,11 +132,12 @@ var useTerminalDimensions = () => {
132
132
  };
133
133
  // src/hooks/use-timeline.ts
134
134
  import { engine, Timeline } from "@opentui/core";
135
- import { useEffect as useEffect7 } from "react";
135
+ import { useEffect as useEffect7, useState as useState2 } from "react";
136
136
  var useTimeline = (options = {}) => {
137
- const timeline = new Timeline(options);
137
+ const [timeline] = useState2(() => new Timeline(options));
138
+ const [autoplay] = useState2(options.autoplay !== false);
138
139
  useEffect7(() => {
139
- if (options.autoplay !== false) {
140
+ if (autoplay) {
140
141
  timeline.play();
141
142
  }
142
143
  engine.register(timeline);
@@ -144,14 +145,14 @@ var useTimeline = (options = {}) => {
144
145
  timeline.pause();
145
146
  engine.unregister(timeline);
146
147
  };
147
- }, []);
148
+ }, [autoplay, timeline]);
148
149
  return timeline;
149
150
  };
150
151
  // src/plugins/slot.tsx
151
152
  import {
152
153
  createSlotRegistry
153
154
  } from "@opentui/core";
154
- import React, { Fragment as Fragment2, useEffect as useEffect8, useMemo, useRef as useRef2, useState as useState2 } from "react";
155
+ import React, { Fragment as Fragment2, useEffect as useEffect8, useMemo, useRef as useRef2, useState as useState3 } from "react";
155
156
  function createReactSlotRegistry(renderer, context, options = {}) {
156
157
  return createSlotRegistry(renderer, "react:slot-registry", context, options);
157
158
  }
@@ -225,7 +226,7 @@ function createSlot(registry, options = {}) {
225
226
  };
226
227
  }
227
228
  function Slot(props) {
228
- const [version, setVersion] = useState2(0);
229
+ const [version, setVersion] = useState3(0);
229
230
  const registry = props.registry;
230
231
  const slotName = String(props.name);
231
232
  const renderFailuresByPluginRef = useRef2(new Map);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "type": "module",
7
- "version": "0.0.0-20260812-897d859a",
7
+ "version": "0.0.0-20260820-e69cf0cc",
8
8
  "description": "React renderer for building terminal user interfaces using OpenTUI core",
9
9
  "license": "MIT",
10
10
  "repository": {
@@ -52,7 +52,7 @@
52
52
  }
53
53
  },
54
54
  "dependencies": {
55
- "@opentui/core": "0.0.0-20260812-897d859a",
55
+ "@opentui/core": "0.0.0-20260820-e69cf0cc",
56
56
  "react-reconciler": "^0.33.0"
57
57
  },
58
58
  "devDependencies": {
package/test-utils.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  createRoot
4
- } from "./chunk-xrgyn3gx.js";
4
+ } from "./chunk-3keq30kf.js";
5
5
  import"./chunk-2mx7fq49.js";
6
6
 
7
7
  // src/test-utils.ts