@procaaso/alphinity-ui-components 1.8.2 → 1.8.3
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 +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -2
- package/dist/index.d.ts +23 -2
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -662,7 +662,16 @@ interface DeviceControlPanelProps {
|
|
|
662
662
|
/** Embedded mode - uses static positioning for rendering in containers (default: false) */
|
|
663
663
|
embedded?: boolean;
|
|
664
664
|
}
|
|
665
|
-
|
|
665
|
+
/**
|
|
666
|
+
* Memoized below (kiosk heap-leak fix, same rationale as DeviceConfigPanel):
|
|
667
|
+
* an OPEN control panel must not re-render on host ticks whose props did not
|
|
668
|
+
* change. Unlike the config panel, a control binding legitimately changes when
|
|
669
|
+
* its live values move, so the memo bails only on genuinely idle ticks - the
|
|
670
|
+
* win is proportional to how often values are flat at display precision.
|
|
671
|
+
*/
|
|
672
|
+
declare function DeviceControlPanelImpl({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onParameterActivate, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, embedded, }: DeviceControlPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
673
|
+
/** Memo boundary - see DeviceControlPanelImpl doc comment (kiosk heap-leak fix). */
|
|
674
|
+
declare const DeviceControlPanel: React__default.MemoExoticComponent<typeof DeviceControlPanelImpl>;
|
|
666
675
|
|
|
667
676
|
interface NumpadDialogProps {
|
|
668
677
|
/** Whether the dialog is open */
|
|
@@ -1970,7 +1979,19 @@ interface DeviceConfigPanelProps {
|
|
|
1970
1979
|
/** Embedded mode - uses static positioning for rendering in containers (default: false) */
|
|
1971
1980
|
embedded?: boolean;
|
|
1972
1981
|
}
|
|
1973
|
-
|
|
1982
|
+
/**
|
|
1983
|
+
* Memoized below (kiosk heap-leak fix): a host whose screen re-renders ~1Hz on
|
|
1984
|
+
* telemetry must not re-render an OPEN config panel every tick - each pass
|
|
1985
|
+
* re-creates the panel's handler closures and re-binds its MUI event handlers,
|
|
1986
|
+
* and on the kiosk those generations were RETAINED (~100 closures/sec,
|
|
1987
|
+
* ~2.1 MB/min heap growth -> renderer OOM at the 512 MB cap, heap-snapshot
|
|
1988
|
+
* fingerprint: Context/scope buckets + onSave/onReset closures). The memo only
|
|
1989
|
+
* pays off when the host passes identity-stable `binding` and handler props;
|
|
1990
|
+
* an unstable host degrades gracefully to the old behavior.
|
|
1991
|
+
*/
|
|
1992
|
+
declare function DeviceConfigPanelImpl({ binding, onClose, onUndock, undockIcon, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onOpenControls, showControlsButton, embedded, }: DeviceConfigPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
1993
|
+
/** Memo boundary - see DeviceConfigPanelImpl doc comment (kiosk heap-leak fix). */
|
|
1994
|
+
declare const DeviceConfigPanel: React__default.MemoExoticComponent<typeof DeviceConfigPanelImpl>;
|
|
1974
1995
|
|
|
1975
1996
|
/**
|
|
1976
1997
|
* Options for simulation behavior
|
package/dist/index.d.ts
CHANGED
|
@@ -662,7 +662,16 @@ interface DeviceControlPanelProps {
|
|
|
662
662
|
/** Embedded mode - uses static positioning for rendering in containers (default: false) */
|
|
663
663
|
embedded?: boolean;
|
|
664
664
|
}
|
|
665
|
-
|
|
665
|
+
/**
|
|
666
|
+
* Memoized below (kiosk heap-leak fix, same rationale as DeviceConfigPanel):
|
|
667
|
+
* an OPEN control panel must not re-render on host ticks whose props did not
|
|
668
|
+
* change. Unlike the config panel, a control binding legitimately changes when
|
|
669
|
+
* its live values move, so the memo bails only on genuinely idle ticks - the
|
|
670
|
+
* win is proportional to how often values are flat at display precision.
|
|
671
|
+
*/
|
|
672
|
+
declare function DeviceControlPanelImpl({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onParameterActivate, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, embedded, }: DeviceControlPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
673
|
+
/** Memo boundary - see DeviceControlPanelImpl doc comment (kiosk heap-leak fix). */
|
|
674
|
+
declare const DeviceControlPanel: React__default.MemoExoticComponent<typeof DeviceControlPanelImpl>;
|
|
666
675
|
|
|
667
676
|
interface NumpadDialogProps {
|
|
668
677
|
/** Whether the dialog is open */
|
|
@@ -1970,7 +1979,19 @@ interface DeviceConfigPanelProps {
|
|
|
1970
1979
|
/** Embedded mode - uses static positioning for rendering in containers (default: false) */
|
|
1971
1980
|
embedded?: boolean;
|
|
1972
1981
|
}
|
|
1973
|
-
|
|
1982
|
+
/**
|
|
1983
|
+
* Memoized below (kiosk heap-leak fix): a host whose screen re-renders ~1Hz on
|
|
1984
|
+
* telemetry must not re-render an OPEN config panel every tick - each pass
|
|
1985
|
+
* re-creates the panel's handler closures and re-binds its MUI event handlers,
|
|
1986
|
+
* and on the kiosk those generations were RETAINED (~100 closures/sec,
|
|
1987
|
+
* ~2.1 MB/min heap growth -> renderer OOM at the 512 MB cap, heap-snapshot
|
|
1988
|
+
* fingerprint: Context/scope buckets + onSave/onReset closures). The memo only
|
|
1989
|
+
* pays off when the host passes identity-stable `binding` and handler props;
|
|
1990
|
+
* an unstable host degrades gracefully to the old behavior.
|
|
1991
|
+
*/
|
|
1992
|
+
declare function DeviceConfigPanelImpl({ binding, onClose, onUndock, undockIcon, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onOpenControls, showControlsButton, embedded, }: DeviceConfigPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
1993
|
+
/** Memo boundary - see DeviceConfigPanelImpl doc comment (kiosk heap-leak fix). */
|
|
1994
|
+
declare const DeviceConfigPanel: React__default.MemoExoticComponent<typeof DeviceConfigPanelImpl>;
|
|
1974
1995
|
|
|
1975
1996
|
/**
|
|
1976
1997
|
* Options for simulation behavior
|
package/dist/index.js
CHANGED
|
@@ -895,7 +895,7 @@ var NodeControlsPanel = ({
|
|
|
895
895
|
};
|
|
896
896
|
|
|
897
897
|
// src/components/DeviceControlPanel/DeviceControlPanel.tsx
|
|
898
|
-
import { useState as useState5, useEffect as useEffect2 } from "react";
|
|
898
|
+
import React5, { useState as useState5, useEffect as useEffect2 } from "react";
|
|
899
899
|
|
|
900
900
|
// src/theme/statusColors.ts
|
|
901
901
|
var DEFAULT_STATUS_COLORS = {
|
|
@@ -922,7 +922,7 @@ function resolveStatusColor(status, customMap) {
|
|
|
922
922
|
|
|
923
923
|
// src/components/DeviceControlPanel/DeviceControlPanel.tsx
|
|
924
924
|
import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
925
|
-
function
|
|
925
|
+
function DeviceControlPanelImpl({
|
|
926
926
|
binding,
|
|
927
927
|
onClose,
|
|
928
928
|
position = "bottom",
|
|
@@ -1847,6 +1847,7 @@ function DeviceControlPanel({
|
|
|
1847
1847
|
` })
|
|
1848
1848
|
] });
|
|
1849
1849
|
}
|
|
1850
|
+
var DeviceControlPanel = React5.memo(DeviceControlPanelImpl);
|
|
1850
1851
|
|
|
1851
1852
|
// src/components/NumpadDialog/NumpadDialog.tsx
|
|
1852
1853
|
import { useState as useState6, useEffect as useEffect3, useCallback as useCallback3, useRef as useRef2, useId } from "react";
|
|
@@ -8590,9 +8591,9 @@ function useDeviceConfigs(initialConfigs) {
|
|
|
8590
8591
|
}
|
|
8591
8592
|
|
|
8592
8593
|
// src/components/DeviceConfigPanel/DeviceConfigPanel.tsx
|
|
8593
|
-
import { useState as useState18, useEffect as useEffect13, useMemo, useRef as useRef8 } from "react";
|
|
8594
|
+
import React15, { useState as useState18, useEffect as useEffect13, useMemo, useRef as useRef8 } from "react";
|
|
8594
8595
|
import { Fragment as Fragment9, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
8595
|
-
function
|
|
8596
|
+
function DeviceConfigPanelImpl({
|
|
8596
8597
|
binding,
|
|
8597
8598
|
onClose,
|
|
8598
8599
|
onUndock,
|
|
@@ -9294,6 +9295,7 @@ function DeviceConfigPanel({
|
|
|
9294
9295
|
)
|
|
9295
9296
|
] });
|
|
9296
9297
|
}
|
|
9298
|
+
var DeviceConfigPanel = React15.memo(DeviceConfigPanelImpl);
|
|
9297
9299
|
|
|
9298
9300
|
// src/diagram/hooks/useSimulation.ts
|
|
9299
9301
|
import { useEffect as useEffect14 } from "react";
|