@almadar/ui 4.51.9 → 4.51.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.
@@ -13697,12 +13697,12 @@ var init_MapView = __esm({
13697
13697
  shadowSize: [41, 41]
13698
13698
  });
13699
13699
  L.Marker.prototype.options.icon = defaultIcon;
13700
- const { useEffect: useEffect87, useRef: useRef87, useCallback: useCallback126, useState: useState120 } = React93__namespace.default;
13700
+ const { useEffect: useEffect87, useRef: useRef88, useCallback: useCallback126, useState: useState120 } = React93__namespace.default;
13701
13701
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
13702
13702
  const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
13703
13703
  function MapUpdater({ centerLat, centerLng, zoom }) {
13704
13704
  const map = useMap();
13705
- const prevRef = useRef87({ centerLat, centerLng, zoom });
13705
+ const prevRef = useRef88({ centerLat, centerLng, zoom });
13706
13706
  useEffect87(() => {
13707
13707
  const prev = prevRef.current;
13708
13708
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
@@ -59058,6 +59058,20 @@ function BrowserPlayground({
59058
59058
  const [runtime] = React93.useState(
59059
59059
  () => new OrbitalServerRuntime.OrbitalServerRuntime({ mode, debug: false })
59060
59060
  );
59061
+ const teardownTimerRef = React93.useRef(null);
59062
+ React93.useEffect(() => {
59063
+ if (teardownTimerRef.current !== null) {
59064
+ clearTimeout(teardownTimerRef.current);
59065
+ teardownTimerRef.current = null;
59066
+ }
59067
+ return () => {
59068
+ teardownTimerRef.current = setTimeout(() => {
59069
+ teardownTimerRef.current = null;
59070
+ playgroundLog.debug("unregisterAll:unmount");
59071
+ runtime.unregisterAll();
59072
+ }, 0);
59073
+ };
59074
+ }, [runtime]);
59061
59075
  React93.useEffect(() => {
59062
59076
  const orbitalNames = schema.orbitals.map((o) => o.name);
59063
59077
  playgroundLog.debug("register:start", { schema: schema.name, orbitalNames });
@@ -59065,12 +59079,6 @@ function BrowserPlayground({
59065
59079
  playgroundLog.debug("register:done", { schema: schema.name, orbitalNames });
59066
59080
  });
59067
59081
  }, [runtime, schema]);
59068
- React93.useEffect(() => {
59069
- return () => {
59070
- playgroundLog.debug("unregisterAll:unmount");
59071
- runtime.unregisterAll();
59072
- };
59073
- }, [runtime]);
59074
59082
  const transport = React93.useMemo(() => ({
59075
59083
  register: async (s) => {
59076
59084
  await runtime.register(s);
package/dist/avl/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { OrbitControls as OrbitControls$1, Grid as Grid$1, Stars, Sparkles, Html, RoundedBox } from '@react-three/drei';
3
3
  import * as React93 from 'react';
4
- import React93__default, { createContext, useState, useEffect, useMemo, useContext, useRef, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
4
+ import React93__default, { createContext, useState, useRef, useEffect, useMemo, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, lazy, useId, forwardRef, useImperativeHandle, Component } from 'react';
5
5
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
6
6
  import ELK from 'elkjs/lib/elk.bundled.js';
7
7
  import { MarkerType, Handle, Position, getBezierPath, EdgeLabelRenderer, BaseEdge, ReactFlowProvider, useNodesState, useEdgesState, useReactFlow, ReactFlow, Controls, Background, BackgroundVariant } from '@xyflow/react';
@@ -13651,12 +13651,12 @@ var init_MapView = __esm({
13651
13651
  shadowSize: [41, 41]
13652
13652
  });
13653
13653
  L.Marker.prototype.options.icon = defaultIcon;
13654
- const { useEffect: useEffect87, useRef: useRef87, useCallback: useCallback126, useState: useState120 } = React93__default;
13654
+ const { useEffect: useEffect87, useRef: useRef88, useCallback: useCallback126, useState: useState120 } = React93__default;
13655
13655
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
13656
13656
  const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
13657
13657
  function MapUpdater({ centerLat, centerLng, zoom }) {
13658
13658
  const map = useMap();
13659
- const prevRef = useRef87({ centerLat, centerLng, zoom });
13659
+ const prevRef = useRef88({ centerLat, centerLng, zoom });
13660
13660
  useEffect87(() => {
13661
13661
  const prev = prevRef.current;
13662
13662
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
@@ -59012,6 +59012,20 @@ function BrowserPlayground({
59012
59012
  const [runtime] = useState(
59013
59013
  () => new OrbitalServerRuntime({ mode, debug: false })
59014
59014
  );
59015
+ const teardownTimerRef = useRef(null);
59016
+ useEffect(() => {
59017
+ if (teardownTimerRef.current !== null) {
59018
+ clearTimeout(teardownTimerRef.current);
59019
+ teardownTimerRef.current = null;
59020
+ }
59021
+ return () => {
59022
+ teardownTimerRef.current = setTimeout(() => {
59023
+ teardownTimerRef.current = null;
59024
+ playgroundLog.debug("unregisterAll:unmount");
59025
+ runtime.unregisterAll();
59026
+ }, 0);
59027
+ };
59028
+ }, [runtime]);
59015
59029
  useEffect(() => {
59016
59030
  const orbitalNames = schema.orbitals.map((o) => o.name);
59017
59031
  playgroundLog.debug("register:start", { schema: schema.name, orbitalNames });
@@ -59019,12 +59033,6 @@ function BrowserPlayground({
59019
59033
  playgroundLog.debug("register:done", { schema: schema.name, orbitalNames });
59020
59034
  });
59021
59035
  }, [runtime, schema]);
59022
- useEffect(() => {
59023
- return () => {
59024
- playgroundLog.debug("unregisterAll:unmount");
59025
- runtime.unregisterAll();
59026
- };
59027
- }, [runtime]);
59028
59036
  const transport = useMemo(() => ({
59029
59037
  register: async (s) => {
59030
59038
  await runtime.register(s);
@@ -9210,12 +9210,12 @@ var init_MapView = __esm({
9210
9210
  shadowSize: [41, 41]
9211
9211
  });
9212
9212
  L.Marker.prototype.options.icon = defaultIcon;
9213
- const { useEffect: useEffect68, useRef: useRef64, useCallback: useCallback110, useState: useState98 } = React80__namespace.default;
9213
+ const { useEffect: useEffect68, useRef: useRef65, useCallback: useCallback110, useState: useState98 } = React80__namespace.default;
9214
9214
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
9215
9215
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
9216
9216
  function MapUpdater({ centerLat, centerLng, zoom }) {
9217
9217
  const map = useMap();
9218
- const prevRef = useRef64({ centerLat, centerLng, zoom });
9218
+ const prevRef = useRef65({ centerLat, centerLng, zoom });
9219
9219
  useEffect68(() => {
9220
9220
  const prev = prevRef.current;
9221
9221
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
@@ -46949,6 +46949,20 @@ function BrowserPlayground({
46949
46949
  const [runtime] = React80.useState(
46950
46950
  () => new OrbitalServerRuntime.OrbitalServerRuntime({ mode, debug: false })
46951
46951
  );
46952
+ const teardownTimerRef = React80.useRef(null);
46953
+ React80.useEffect(() => {
46954
+ if (teardownTimerRef.current !== null) {
46955
+ clearTimeout(teardownTimerRef.current);
46956
+ teardownTimerRef.current = null;
46957
+ }
46958
+ return () => {
46959
+ teardownTimerRef.current = setTimeout(() => {
46960
+ teardownTimerRef.current = null;
46961
+ playgroundLog.debug("unregisterAll:unmount");
46962
+ runtime.unregisterAll();
46963
+ }, 0);
46964
+ };
46965
+ }, [runtime]);
46952
46966
  React80.useEffect(() => {
46953
46967
  const orbitalNames = schema.orbitals.map((o) => o.name);
46954
46968
  playgroundLog.debug("register:start", { schema: schema.name, orbitalNames });
@@ -46956,12 +46970,6 @@ function BrowserPlayground({
46956
46970
  playgroundLog.debug("register:done", { schema: schema.name, orbitalNames });
46957
46971
  });
46958
46972
  }, [runtime, schema]);
46959
- React80.useEffect(() => {
46960
- return () => {
46961
- playgroundLog.debug("unregisterAll:unmount");
46962
- runtime.unregisterAll();
46963
- };
46964
- }, [runtime]);
46965
46973
  const transport = React80.useMemo(() => ({
46966
46974
  register: async (s) => {
46967
46975
  await runtime.register(s);
@@ -9164,12 +9164,12 @@ var init_MapView = __esm({
9164
9164
  shadowSize: [41, 41]
9165
9165
  });
9166
9166
  L.Marker.prototype.options.icon = defaultIcon;
9167
- const { useEffect: useEffect68, useRef: useRef64, useCallback: useCallback110, useState: useState98 } = React80__default;
9167
+ const { useEffect: useEffect68, useRef: useRef65, useCallback: useCallback110, useState: useState98 } = React80__default;
9168
9168
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
9169
9169
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
9170
9170
  function MapUpdater({ centerLat, centerLng, zoom }) {
9171
9171
  const map = useMap();
9172
- const prevRef = useRef64({ centerLat, centerLng, zoom });
9172
+ const prevRef = useRef65({ centerLat, centerLng, zoom });
9173
9173
  useEffect68(() => {
9174
9174
  const prev = prevRef.current;
9175
9175
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
@@ -46903,6 +46903,20 @@ function BrowserPlayground({
46903
46903
  const [runtime] = useState(
46904
46904
  () => new OrbitalServerRuntime({ mode, debug: false })
46905
46905
  );
46906
+ const teardownTimerRef = useRef(null);
46907
+ useEffect(() => {
46908
+ if (teardownTimerRef.current !== null) {
46909
+ clearTimeout(teardownTimerRef.current);
46910
+ teardownTimerRef.current = null;
46911
+ }
46912
+ return () => {
46913
+ teardownTimerRef.current = setTimeout(() => {
46914
+ teardownTimerRef.current = null;
46915
+ playgroundLog.debug("unregisterAll:unmount");
46916
+ runtime.unregisterAll();
46917
+ }, 0);
46918
+ };
46919
+ }, [runtime]);
46906
46920
  useEffect(() => {
46907
46921
  const orbitalNames = schema.orbitals.map((o) => o.name);
46908
46922
  playgroundLog.debug("register:start", { schema: schema.name, orbitalNames });
@@ -46910,12 +46924,6 @@ function BrowserPlayground({
46910
46924
  playgroundLog.debug("register:done", { schema: schema.name, orbitalNames });
46911
46925
  });
46912
46926
  }, [runtime, schema]);
46913
- useEffect(() => {
46914
- return () => {
46915
- playgroundLog.debug("unregisterAll:unmount");
46916
- runtime.unregisterAll();
46917
- };
46918
- }, [runtime]);
46919
46927
  const transport = useMemo(() => ({
46920
46928
  register: async (s) => {
46921
46929
  await runtime.register(s);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "4.51.9",
3
+ "version": "4.51.10",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [