@superatomai/application-react 0.0.5 → 0.0.6
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.
- package/dist/index.cjs +10 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -3
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React6 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var shim = require('use-sync-external-store/shim');
|
|
5
6
|
var reactDom = require('react-dom');
|
|
6
7
|
|
|
7
8
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -69475,7 +69476,7 @@ function setSigningIn(value) {
|
|
|
69475
69476
|
listeners.forEach((l) => l());
|
|
69476
69477
|
}
|
|
69477
69478
|
function useSigningIn() {
|
|
69478
|
-
return
|
|
69479
|
+
return shim.useSyncExternalStore(
|
|
69479
69480
|
(l) => {
|
|
69480
69481
|
listeners.add(l);
|
|
69481
69482
|
return () => listeners.delete(l);
|
|
@@ -69490,7 +69491,7 @@ function setChatReady(value) {
|
|
|
69490
69491
|
listeners.forEach((l) => l());
|
|
69491
69492
|
}
|
|
69492
69493
|
function useStartingUp() {
|
|
69493
|
-
return
|
|
69494
|
+
return shim.useSyncExternalStore(
|
|
69494
69495
|
(l) => {
|
|
69495
69496
|
listeners.add(l);
|
|
69496
69497
|
return () => listeners.delete(l);
|
|
@@ -69500,7 +69501,7 @@ function useStartingUp() {
|
|
|
69500
69501
|
);
|
|
69501
69502
|
}
|
|
69502
69503
|
function useRetryingStatus() {
|
|
69503
|
-
return
|
|
69504
|
+
return shim.useSyncExternalStore(
|
|
69504
69505
|
(l) => {
|
|
69505
69506
|
listeners.add(l);
|
|
69506
69507
|
return () => listeners.delete(l);
|
|
@@ -69510,7 +69511,7 @@ function useRetryingStatus() {
|
|
|
69510
69511
|
);
|
|
69511
69512
|
}
|
|
69512
69513
|
function useAuthStatus() {
|
|
69513
|
-
return
|
|
69514
|
+
return shim.useSyncExternalStore(
|
|
69514
69515
|
(l) => {
|
|
69515
69516
|
listeners.add(l);
|
|
69516
69517
|
return () => listeners.delete(l);
|
|
@@ -69561,7 +69562,7 @@ function setMessageActions(actions) {
|
|
|
69561
69562
|
listeners2.forEach((l) => l());
|
|
69562
69563
|
}
|
|
69563
69564
|
function useMessageActions() {
|
|
69564
|
-
return
|
|
69565
|
+
return shim.useSyncExternalStore(
|
|
69565
69566
|
(l) => {
|
|
69566
69567
|
listeners2.add(l);
|
|
69567
69568
|
return () => listeners2.delete(l);
|
|
@@ -70581,14 +70582,17 @@ function ChatInput({
|
|
|
70581
70582
|
return () => cancelAnimationFrame(frame);
|
|
70582
70583
|
}
|
|
70583
70584
|
let width = textarea.clientWidth;
|
|
70585
|
+
let pending = 0;
|
|
70584
70586
|
const observer = new ResizeObserver(() => {
|
|
70585
70587
|
if (textarea.clientWidth === width) return;
|
|
70586
70588
|
width = textarea.clientWidth;
|
|
70587
|
-
|
|
70589
|
+
cancelAnimationFrame(pending);
|
|
70590
|
+
pending = requestAnimationFrame(resize);
|
|
70588
70591
|
});
|
|
70589
70592
|
observer.observe(textarea);
|
|
70590
70593
|
return () => {
|
|
70591
70594
|
cancelAnimationFrame(frame);
|
|
70595
|
+
cancelAnimationFrame(pending);
|
|
70592
70596
|
observer.disconnect();
|
|
70593
70597
|
};
|
|
70594
70598
|
}, [resize]);
|