@trackunit/react-map 0.2.44 → 0.2.48-alpha-90b6c9b97dd.0
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/index.cjs.js +3 -8
- package/index.esm.js +3 -8
- package/package.json +10 -10
- package/src/panel/Panel.d.ts +1 -2
package/index.cjs.js
CHANGED
|
@@ -823,8 +823,7 @@ const PANEL_SCROLL_INTERNAL_CLASS_NAME = "flex flex-1 min-h-0 flex-col overflow-
|
|
|
823
823
|
* "" — element is in DOM (for Floating UI to measure) but hidden via
|
|
824
824
|
* CSS `visibility: hidden` so the pre-commit translate(0,0)
|
|
825
825
|
* position is never visible.
|
|
826
|
-
* "open" —
|
|
827
|
-
* animation — see docs/adr/0027-instant-panel-first-paint.md).
|
|
826
|
+
* "open" — fades in via CSS opacity transition once placement is committed.
|
|
828
827
|
* "closing" — fades out during the EXIT_DURATION_MS window before unmount.
|
|
829
828
|
*
|
|
830
829
|
* @internal
|
|
@@ -973,9 +972,9 @@ const Panel = ({ anchor, placement = DEFAULT_PLACEMENT$1, onDismiss, closeLabel
|
|
|
973
972
|
if (effectiveAnchor === null) {
|
|
974
973
|
return null;
|
|
975
974
|
}
|
|
976
|
-
// data-panel drives the CSS
|
|
975
|
+
// data-panel drives the CSS animation state machine (Panel.css):
|
|
977
976
|
// "" — pre-commit: visibility:hidden so translate(0,0) is never seen
|
|
978
|
-
// "open" —
|
|
977
|
+
// "open" — fade in via opacity transition
|
|
979
978
|
// "closing" — fade out before unmount
|
|
980
979
|
const panelState = isClosing ? "closing" : isCommitted ? "open" : "";
|
|
981
980
|
return (jsxRuntime.jsxs("div", { className: PANEL_SHELL_CLASS_NAME, "data-panel": panelState, ref: mergedShellRef, style: floatingStyles, ...getFloatingProps(), "aria-label": ariaLabel, children: [jsxRuntime.jsx("div", { className: PANEL_CHROME_CLASS_NAME, style: { maxHeight: `min(${PANEL_MAX_HEIGHT_PX}px, ${PANEL_MAX_HEIGHT_VH}vh)` }, children: jsxRuntime.jsx("div", { className: scrollSlotClassName, "data-testid": "panel-scroll-slot", ref: scrollRef, children: children }) }), onClickDismiss !== undefined ? (jsxRuntime.jsx("div", { className: "absolute right-0 top-0 z-10 -translate-y-1/2 translate-x-1/2 rounded-2xl border border-neutral-300 bg-white shadow-sm", children: jsxRuntime.jsx(PanelIconButton, { "aria-label": closeLabel, "data-testid": "panel-close-button", onClick: onClickDismiss, children: jsxRuntime.jsx(reactComponents.Icon, { ariaHidden: true, className: "text-neutral-700", name: "XMark", size: "small" }) }) })) : null] }));
|
|
@@ -2064,10 +2063,6 @@ const computePlacement = (triggerEl, containerEl) => {
|
|
|
2064
2063
|
const usePopoverPlacement = (triggerRef, containerRef, options = {}) => {
|
|
2065
2064
|
const { skip = false } = options;
|
|
2066
2065
|
const [placement, setPlacement] = react.useState(DEFAULT_PLACEMENT);
|
|
2067
|
-
// Post-paint measurement is sufficient: both callers invoke this hook where
|
|
2068
|
-
// the always-mounted trigger renders, so placement settles with the map —
|
|
2069
|
-
// long before a popover can open. A layout effect would only add pre-paint
|
|
2070
|
-
// measurement work during map load (SAGA-675 review).
|
|
2071
2066
|
react.useEffect(() => {
|
|
2072
2067
|
if (skip) {
|
|
2073
2068
|
return;
|
package/index.esm.js
CHANGED
|
@@ -822,8 +822,7 @@ const PANEL_SCROLL_INTERNAL_CLASS_NAME = "flex flex-1 min-h-0 flex-col overflow-
|
|
|
822
822
|
* "" — element is in DOM (for Floating UI to measure) but hidden via
|
|
823
823
|
* CSS `visibility: hidden` so the pre-commit translate(0,0)
|
|
824
824
|
* position is never visible.
|
|
825
|
-
* "open" —
|
|
826
|
-
* animation — see docs/adr/0027-instant-panel-first-paint.md).
|
|
825
|
+
* "open" — fades in via CSS opacity transition once placement is committed.
|
|
827
826
|
* "closing" — fades out during the EXIT_DURATION_MS window before unmount.
|
|
828
827
|
*
|
|
829
828
|
* @internal
|
|
@@ -972,9 +971,9 @@ const Panel = ({ anchor, placement = DEFAULT_PLACEMENT$1, onDismiss, closeLabel
|
|
|
972
971
|
if (effectiveAnchor === null) {
|
|
973
972
|
return null;
|
|
974
973
|
}
|
|
975
|
-
// data-panel drives the CSS
|
|
974
|
+
// data-panel drives the CSS animation state machine (Panel.css):
|
|
976
975
|
// "" — pre-commit: visibility:hidden so translate(0,0) is never seen
|
|
977
|
-
// "open" —
|
|
976
|
+
// "open" — fade in via opacity transition
|
|
978
977
|
// "closing" — fade out before unmount
|
|
979
978
|
const panelState = isClosing ? "closing" : isCommitted ? "open" : "";
|
|
980
979
|
return (jsxs("div", { className: PANEL_SHELL_CLASS_NAME, "data-panel": panelState, ref: mergedShellRef, style: floatingStyles, ...getFloatingProps(), "aria-label": ariaLabel, children: [jsx("div", { className: PANEL_CHROME_CLASS_NAME, style: { maxHeight: `min(${PANEL_MAX_HEIGHT_PX}px, ${PANEL_MAX_HEIGHT_VH}vh)` }, children: jsx("div", { className: scrollSlotClassName, "data-testid": "panel-scroll-slot", ref: scrollRef, children: children }) }), onClickDismiss !== undefined ? (jsx("div", { className: "absolute right-0 top-0 z-10 -translate-y-1/2 translate-x-1/2 rounded-2xl border border-neutral-300 bg-white shadow-sm", children: jsx(PanelIconButton, { "aria-label": closeLabel, "data-testid": "panel-close-button", onClick: onClickDismiss, children: jsx(Icon, { ariaHidden: true, className: "text-neutral-700", name: "XMark", size: "small" }) }) })) : null] }));
|
|
@@ -2063,10 +2062,6 @@ const computePlacement = (triggerEl, containerEl) => {
|
|
|
2063
2062
|
const usePopoverPlacement = (triggerRef, containerRef, options = {}) => {
|
|
2064
2063
|
const { skip = false } = options;
|
|
2065
2064
|
const [placement, setPlacement] = useState(DEFAULT_PLACEMENT);
|
|
2066
|
-
// Post-paint measurement is sufficient: both callers invoke this hook where
|
|
2067
|
-
// the always-mounted trigger renders, so placement settles with the map —
|
|
2068
|
-
// long before a popover can open. A layout effect would only add pre-paint
|
|
2069
|
-
// measurement work during map load (SAGA-675 review).
|
|
2070
2065
|
useEffect(() => {
|
|
2071
2066
|
if (skip) {
|
|
2072
2067
|
return;
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-map",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.48-alpha-90b6c9b97dd.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@trackunit/react-components": "2.
|
|
11
|
-
"@trackunit/css-class-variance-utilities": "1.13.
|
|
12
|
-
"@trackunit/react-form-components": "2.3.
|
|
13
|
-
"@trackunit/react-core-hooks": "1.19.
|
|
14
|
-
"@trackunit/geo-json-utils": "1.14.
|
|
15
|
-
"@trackunit/i18n-library-translation": "2.2.
|
|
10
|
+
"@trackunit/react-components": "2.4.2-alpha-90b6c9b97dd.0",
|
|
11
|
+
"@trackunit/css-class-variance-utilities": "1.13.92-alpha-90b6c9b97dd.0",
|
|
12
|
+
"@trackunit/react-form-components": "2.3.8-alpha-90b6c9b97dd.0",
|
|
13
|
+
"@trackunit/react-core-hooks": "1.19.7-alpha-90b6c9b97dd.0",
|
|
14
|
+
"@trackunit/geo-json-utils": "1.14.95-alpha-90b6c9b97dd.0",
|
|
15
|
+
"@trackunit/i18n-library-translation": "2.2.7-alpha-90b6c9b97dd.0",
|
|
16
16
|
"react-minimal-pie-chart": "^8.4.0",
|
|
17
|
-
"@trackunit/react-map-adapter-shared": "0.0.
|
|
18
|
-
"@trackunit/react-map-color-utils": "0.0.
|
|
19
|
-
"@trackunit/ui-design-tokens": "1.13.
|
|
17
|
+
"@trackunit/react-map-adapter-shared": "0.0.76-alpha-90b6c9b97dd.0",
|
|
18
|
+
"@trackunit/react-map-color-utils": "0.0.61-alpha-90b6c9b97dd.0",
|
|
19
|
+
"@trackunit/ui-design-tokens": "1.13.91-alpha-90b6c9b97dd.0",
|
|
20
20
|
"@floating-ui/react": "^0.26.25",
|
|
21
21
|
"es-toolkit": "^1.39.10",
|
|
22
22
|
"tailwind-merge": "^2.0.0",
|
package/src/panel/Panel.d.ts
CHANGED
|
@@ -56,8 +56,7 @@ export type PanelProps = Readonly<{
|
|
|
56
56
|
* "" — element is in DOM (for Floating UI to measure) but hidden via
|
|
57
57
|
* CSS `visibility: hidden` so the pre-commit translate(0,0)
|
|
58
58
|
* position is never visible.
|
|
59
|
-
* "open" —
|
|
60
|
-
* animation — see docs/adr/0027-instant-panel-first-paint.md).
|
|
59
|
+
* "open" — fades in via CSS opacity transition once placement is committed.
|
|
61
60
|
* "closing" — fades out during the EXIT_DURATION_MS window before unmount.
|
|
62
61
|
*
|
|
63
62
|
* @internal
|