react-display-scale-engine 0.1.1
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/LICENSE +21 -0
- package/README.md +84 -0
- package/bin/rds-engine.mjs +89 -0
- package/dist/chunk-6UB65SJB.js +68 -0
- package/dist/chunk-6UB65SJB.js.map +1 -0
- package/dist/chunk-AGM7V7PR.js +413 -0
- package/dist/chunk-AGM7V7PR.js.map +1 -0
- package/dist/chunk-R5CTLLUS.js +219 -0
- package/dist/chunk-R5CTLLUS.js.map +1 -0
- package/dist/chunk-SLNYXBHU.js +3 -0
- package/dist/chunk-SLNYXBHU.js.map +1 -0
- package/dist/chunk-U3ZWHUJG.js +28 -0
- package/dist/chunk-U3ZWHUJG.js.map +1 -0
- package/dist/chunk-VWJNHWMD.js +498 -0
- package/dist/chunk-VWJNHWMD.js.map +1 -0
- package/dist/core.d.ts +37 -0
- package/dist/core.js +5 -0
- package/dist/core.js.map +1 -0
- package/dist/displayScaleLogicalViewport-Ikf-DtkQ.d.ts +159 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/mui.d.ts +72 -0
- package/dist/mui.js +5 -0
- package/dist/mui.js.map +1 -0
- package/dist/react.d.ts +81 -0
- package/dist/react.js +6 -0
- package/dist/react.js.map +1 -0
- package/docs/display-scale-engine.md +208 -0
- package/package.json +85 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/** How browser zoom was estimated. */
|
|
2
|
+
type DisplayScaleDetectionMethod = "visual-viewport" | "baseline-ratio" | "device-pixel-ratio" | "unavailable";
|
|
3
|
+
type DisplayScaleConfidence = "high" | "medium" | "low";
|
|
4
|
+
/** Whether browser-zoom calibration was explicitly confirmed by the application. */
|
|
5
|
+
type DisplayScaleCalibration = "explicit" | "automatic" | "unavailable";
|
|
6
|
+
type DisplayScaleViewport = {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
};
|
|
10
|
+
type DisplayScaleScreen = {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
availWidth: number;
|
|
14
|
+
availHeight: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Point-in-time reading of display / zoom state.
|
|
18
|
+
*
|
|
19
|
+
* - `browserZoom`: page zoom relative to the calibrated baseline (1 = 100%).
|
|
20
|
+
* - `osDisplayScale`: OS display scaling (DPI) estimated from DPR ÷ browser zoom.
|
|
21
|
+
* - `devicePixelRatio`: raw `window.devicePixelRatio`.
|
|
22
|
+
*/
|
|
23
|
+
type DisplayScaleSnapshot = {
|
|
24
|
+
browserZoom: number;
|
|
25
|
+
browserZoomPercent: number;
|
|
26
|
+
osDisplayScale: number;
|
|
27
|
+
osDisplayScalePercent: number;
|
|
28
|
+
devicePixelRatio: number;
|
|
29
|
+
effectiveScale: number;
|
|
30
|
+
viewport: DisplayScaleViewport;
|
|
31
|
+
screen: DisplayScaleScreen;
|
|
32
|
+
method: DisplayScaleDetectionMethod;
|
|
33
|
+
confidence: DisplayScaleConfidence;
|
|
34
|
+
calibration: DisplayScaleCalibration;
|
|
35
|
+
measuredAt: string;
|
|
36
|
+
};
|
|
37
|
+
type DisplayScaleBaseline = {
|
|
38
|
+
devicePixelRatio: number;
|
|
39
|
+
browserZoom: number;
|
|
40
|
+
capturedAt: string;
|
|
41
|
+
/** True only when created by recalibrateDisplayScale at a known page zoom. */
|
|
42
|
+
isExplicit?: boolean;
|
|
43
|
+
};
|
|
44
|
+
type DisplayScaleIssue = "browser-zoomed-in" | "browser-zoomed-out" | "high-os-scale" | "viewport-too-narrow";
|
|
45
|
+
type DisplayScaleThresholds = {
|
|
46
|
+
/** Minimum acceptable browser zoom (default 0.9). */
|
|
47
|
+
browserZoomMin?: number;
|
|
48
|
+
/** Maximum acceptable browser zoom (default 1.1). */
|
|
49
|
+
browserZoomMax?: number;
|
|
50
|
+
/** Maximum acceptable OS display scale (default 2). */
|
|
51
|
+
osDisplayScaleMax?: number;
|
|
52
|
+
/** Warn when viewport width is below this CSS pixel value (default 0 = disabled). */
|
|
53
|
+
minViewportWidth?: number;
|
|
54
|
+
};
|
|
55
|
+
type DisplayScaleEvaluation = {
|
|
56
|
+
snapshot: DisplayScaleSnapshot;
|
|
57
|
+
issues: DisplayScaleIssue[];
|
|
58
|
+
isAcceptable: boolean;
|
|
59
|
+
};
|
|
60
|
+
type DetectDisplayScaleOptions = {
|
|
61
|
+
/**
|
|
62
|
+
* When no baseline exists, store the current reading as 100% browser zoom.
|
|
63
|
+
* Users can call `recalibrateDisplayScale()` after resetting browser zoom.
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
autoBaseline?: boolean;
|
|
67
|
+
};
|
|
68
|
+
type SubscribeDisplayScaleOptions = DetectDisplayScaleOptions & {
|
|
69
|
+
/** Debounce window resize / visualViewport events. @default 100 */
|
|
70
|
+
debounceMs?: number;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
type DisplayScaleCompensationConfig = {
|
|
74
|
+
/** Master switch. @default true */
|
|
75
|
+
enabled: boolean;
|
|
76
|
+
/** Only run on Windows desktop/laptop — skips macOS Retina (DPR 2). @default true */
|
|
77
|
+
windowsOnly: boolean;
|
|
78
|
+
/** Compensate when snapped OS scale is above this value. @default 1.05 */
|
|
79
|
+
minOsScaleToCompensate: number;
|
|
80
|
+
/** Emulate this OS scale after compensation (1 = 100%). @default 1 */
|
|
81
|
+
targetOsScale: number;
|
|
82
|
+
/** Snap measured scale to Windows tiers for stable zoom. @default true */
|
|
83
|
+
snapOsScale: boolean;
|
|
84
|
+
/** Require a baseline explicitly calibrated at known browser zoom before compensating. @default false */
|
|
85
|
+
requireExplicitCalibration: boolean;
|
|
86
|
+
};
|
|
87
|
+
declare const DEFAULT_DISPLAY_SCALE_COMPENSATION_CONFIG: DisplayScaleCompensationConfig;
|
|
88
|
+
type DisplayScaleCompensation = {
|
|
89
|
+
active: boolean;
|
|
90
|
+
/** CSS `zoom` / transform scale applied to the app root (e.g. 0.667 for 150% OS). */
|
|
91
|
+
zoom: number;
|
|
92
|
+
/** @deprecated Prefer {@link measureDisplayScaleLayoutExtents} pixel layout size. */
|
|
93
|
+
widthPercent: number;
|
|
94
|
+
/** @deprecated Prefer {@link measureDisplayScaleLayoutExtents} pixel layout size. */
|
|
95
|
+
heightPercent: number;
|
|
96
|
+
/** Snapped OS scale used for compensation. */
|
|
97
|
+
osDisplayScale: number;
|
|
98
|
+
/** Target OS scale after compensation (percent). */
|
|
99
|
+
targetOsScalePercent: number;
|
|
100
|
+
};
|
|
101
|
+
type DisplayScaleLayoutExtents = {
|
|
102
|
+
/** Pre-zoom layout width so `layoutWidth * zoom` matches the visible viewport. */
|
|
103
|
+
layoutWidthPx: number;
|
|
104
|
+
/** Pre-zoom layout height so `layoutHeight * zoom` matches the visible viewport. */
|
|
105
|
+
layoutHeightPx: number;
|
|
106
|
+
};
|
|
107
|
+
type ComputeDisplayScaleCompensationOptions = Partial<DisplayScaleCompensationConfig>;
|
|
108
|
+
declare function supportsCssZoom(): boolean;
|
|
109
|
+
declare function computeDisplayScaleCompensation(snapshot: DisplayScaleSnapshot, options?: ComputeDisplayScaleCompensationOptions): DisplayScaleCompensation;
|
|
110
|
+
/**
|
|
111
|
+
* Warm up detection before React mounts (stores baseline + sets html metadata).
|
|
112
|
+
* Visual compensation is applied by `DisplayScaleCompensationProvider`.
|
|
113
|
+
*/
|
|
114
|
+
declare function primeDisplayScaleCompensation(options?: ComputeDisplayScaleCompensationOptions): DisplayScaleCompensation;
|
|
115
|
+
/** Read the visible viewport in CSS pixels (avoids `%` / `vw` inflation on scaled displays). */
|
|
116
|
+
declare function readDisplayScaleViewportSize(): {
|
|
117
|
+
width: number;
|
|
118
|
+
height: number;
|
|
119
|
+
};
|
|
120
|
+
/** Layout box size for the compensation root before `zoom` is applied. */
|
|
121
|
+
declare function measureDisplayScaleLayoutExtents(zoom: number): DisplayScaleLayoutExtents;
|
|
122
|
+
declare function applyDisplayScaleCompensationStyles(element: HTMLElement, compensation: DisplayScaleCompensation, extents?: DisplayScaleLayoutExtents): void;
|
|
123
|
+
declare function clearDisplayScaleCompensationStyles(element: HTMLElement): void;
|
|
124
|
+
/** Publish compensation metadata on `html` (visual zoom lives on the app root). */
|
|
125
|
+
declare function syncDisplayScaleCompensationMetadata(compensation: DisplayScaleCompensation, extents?: DisplayScaleLayoutExtents, snapshot?: DisplayScaleSnapshot): void;
|
|
126
|
+
/** @deprecated Use {@link syncDisplayScaleCompensationMetadata} + root element styles. */
|
|
127
|
+
declare function applyDisplayScaleCompensationToDocument(compensation: DisplayScaleCompensation): void;
|
|
128
|
+
/** Remove html metadata from legacy document-level compensation. */
|
|
129
|
+
declare function clearDisplayScaleCompensationFromDocument(): void;
|
|
130
|
+
|
|
131
|
+
type DisplayScaleLogicalViewport = {
|
|
132
|
+
/** Visible viewport in browser CSS pixels. */
|
|
133
|
+
viewportWidth: number;
|
|
134
|
+
viewportHeight: number;
|
|
135
|
+
/** Visible viewport in the compensated root's coordinate space. */
|
|
136
|
+
logicalWidth: number;
|
|
137
|
+
logicalHeight: number;
|
|
138
|
+
zoom: number;
|
|
139
|
+
};
|
|
140
|
+
type DisplayScaleOverlayBoundsOptions = {
|
|
141
|
+
/** Space between the anchor and the overlay, in visible CSS pixels. */
|
|
142
|
+
offset?: number;
|
|
143
|
+
/** Minimum safe space at the viewport edge, in visible CSS pixels. */
|
|
144
|
+
viewportInset?: number;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Returns viewport dimensions in both browser and compensated-root coordinates.
|
|
148
|
+
* Use the logical dimensions for content that is rendered inside the compensated root.
|
|
149
|
+
*/
|
|
150
|
+
declare function getDisplayScaleLogicalViewport(compensation: Pick<DisplayScaleCompensation, "zoom">): DisplayScaleLogicalViewport;
|
|
151
|
+
/** Convert a visible browser CSS-pixel measurement to the compensated root coordinate space. */
|
|
152
|
+
declare function toDisplayScaleLogicalPixels(value: number, compensation: Pick<DisplayScaleCompensation, "zoom">): number;
|
|
153
|
+
/**
|
|
154
|
+
* Maximum height for an overlay positioned below an anchor.
|
|
155
|
+
* The return value is suitable for an element rendered in the compensated root.
|
|
156
|
+
*/
|
|
157
|
+
declare function getDisplayScaleOverlayMaxHeight(anchorRect: Pick<DOMRect, "bottom">, compensation: Pick<DisplayScaleCompensation, "zoom">, options?: DisplayScaleOverlayBoundsOptions): number;
|
|
158
|
+
|
|
159
|
+
export { supportsCssZoom as A, syncDisplayScaleCompensationMetadata as B, type ComputeDisplayScaleCompensationOptions as C, DEFAULT_DISPLAY_SCALE_COMPENSATION_CONFIG as D, toDisplayScaleLogicalPixels as E, type SubscribeDisplayScaleOptions as S, type DetectDisplayScaleOptions as a, type DisplayScaleBaseline as b, type DisplayScaleCalibration as c, type DisplayScaleCompensation as d, type DisplayScaleCompensationConfig as e, type DisplayScaleConfidence as f, type DisplayScaleDetectionMethod as g, type DisplayScaleEvaluation as h, type DisplayScaleIssue as i, type DisplayScaleLayoutExtents as j, type DisplayScaleLogicalViewport as k, type DisplayScaleOverlayBoundsOptions as l, type DisplayScaleScreen as m, type DisplayScaleSnapshot as n, type DisplayScaleThresholds as o, type DisplayScaleViewport as p, applyDisplayScaleCompensationStyles as q, applyDisplayScaleCompensationToDocument as r, clearDisplayScaleCompensationFromDocument as s, clearDisplayScaleCompensationStyles as t, computeDisplayScaleCompensation as u, getDisplayScaleLogicalViewport as v, getDisplayScaleOverlayMaxHeight as w, measureDisplayScaleLayoutExtents as x, primeDisplayScaleCompensation as y, readDisplayScaleViewportSize as z };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { DEFAULT_DISPLAY_SCALE_THRESHOLDS, clearDisplayScaleBaseline, detectDisplayScale, evaluateDisplayScale, readDisplayScaleBaseline, recalibrateDisplayScale, resetDisplayScaleEngine, shouldApplyOsScaleCompensation, snapToWindowsOsScale, subscribeDisplayScale, writeDisplayScaleBaseline } from './core.js';
|
|
2
|
+
export { C as ComputeDisplayScaleCompensationOptions, D as DEFAULT_DISPLAY_SCALE_COMPENSATION_CONFIG, a as DetectDisplayScaleOptions, b as DisplayScaleBaseline, c as DisplayScaleCalibration, d as DisplayScaleCompensation, e as DisplayScaleCompensationConfig, f as DisplayScaleConfidence, g as DisplayScaleDetectionMethod, h as DisplayScaleEvaluation, i as DisplayScaleIssue, j as DisplayScaleLayoutExtents, k as DisplayScaleLogicalViewport, l as DisplayScaleOverlayBoundsOptions, m as DisplayScaleScreen, n as DisplayScaleSnapshot, o as DisplayScaleThresholds, p as DisplayScaleViewport, S as SubscribeDisplayScaleOptions, q as applyDisplayScaleCompensationStyles, r as applyDisplayScaleCompensationToDocument, s as clearDisplayScaleCompensationFromDocument, t as clearDisplayScaleCompensationStyles, u as computeDisplayScaleCompensation, v as getDisplayScaleLogicalViewport, w as getDisplayScaleOverlayMaxHeight, x as measureDisplayScaleLayoutExtents, y as primeDisplayScaleCompensation, z as readDisplayScaleViewportSize, A as supportsCssZoom, B as syncDisplayScaleCompensationMetadata, E as toDisplayScaleLogicalPixels } from './displayScaleLogicalViewport-Ikf-DtkQ.js';
|
|
3
|
+
export { DisplayScaleCompensationProvider, DisplayScaleOverlay, DisplayScaleOverlayStrategy, DisplayScaleProvider, DisplayScaleProviderProps, DisplayScaleVirtualAnchor, useDisplayScale, useDisplayScaleAnchor, useDisplayScaleCompensation, useDisplayScaleOverlay, useDisplayScalePortalContainer, useLogicalMaxWidth, useLogicalMinWidth } from './react.js';
|
|
4
|
+
export { DisplayScaleMenu, DisplayScaleMenuProps, DisplayScalePopover, DisplayScalePopoverProps, DisplayScalePopper, DisplayScalePopperProps, DisplayScaleSelect, createMuiDisplayScaleComponents, displayScalePageFillSx, signinSplitColumnSx, signinViewportShellSx, useDisplayScalePopoverPosition, useDisplayScaleTabsIndicator } from './mui.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '@mui/material/styles';
|
|
7
|
+
import '@mui/material';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import './chunk-SLNYXBHU.js';
|
|
2
|
+
export { useDisplayScaleOverlay, useLogicalMaxWidth, useLogicalMinWidth } from './chunk-6UB65SJB.js';
|
|
3
|
+
export { getDisplayScaleLogicalViewport, getDisplayScaleOverlayMaxHeight, toDisplayScaleLogicalPixels } from './chunk-U3ZWHUJG.js';
|
|
4
|
+
export { DisplayScaleMenu, DisplayScalePopover, DisplayScalePopper, DisplayScaleSelect, createMuiDisplayScaleComponents, displayScalePageFillSx, signinSplitColumnSx, signinViewportShellSx, useDisplayScalePopoverPosition, useDisplayScaleTabsIndicator } from './chunk-AGM7V7PR.js';
|
|
5
|
+
export { DisplayScaleCompensationProvider, DisplayScaleProvider, useDisplayScale, useDisplayScaleAnchor, useDisplayScaleCompensation, useDisplayScalePortalContainer } from './chunk-R5CTLLUS.js';
|
|
6
|
+
export { DEFAULT_DISPLAY_SCALE_COMPENSATION_CONFIG, DEFAULT_DISPLAY_SCALE_THRESHOLDS, applyDisplayScaleCompensationStyles, applyDisplayScaleCompensationToDocument, clearDisplayScaleBaseline, clearDisplayScaleCompensationFromDocument, clearDisplayScaleCompensationStyles, computeDisplayScaleCompensation, detectDisplayScale, evaluateDisplayScale, measureDisplayScaleLayoutExtents, primeDisplayScaleCompensation, readDisplayScaleBaseline, readDisplayScaleViewportSize, recalibrateDisplayScale, resetDisplayScaleEngine, shouldApplyOsScaleCompensation, snapToWindowsOsScale, subscribeDisplayScale, supportsCssZoom, syncDisplayScaleCompensationMetadata, writeDisplayScaleBaseline } from './chunk-VWJNHWMD.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
package/dist/mui.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Components, Theme, SxProps } from '@mui/material/styles';
|
|
2
|
+
import { MenuProps, PopoverProps, PopperProps, SelectProps } from '@mui/material';
|
|
3
|
+
import { ReactElement, RefObject } from 'react';
|
|
4
|
+
|
|
5
|
+
type PortalContainerGetter = () => HTMLElement;
|
|
6
|
+
type MuiDisplayScaleComponentsOptions = {
|
|
7
|
+
getPortalContainer: PortalContainerGetter;
|
|
8
|
+
/**
|
|
9
|
+
* Overlay content is portalled outside the zoomed app root, so it needs the
|
|
10
|
+
* same density correction independently.
|
|
11
|
+
*/
|
|
12
|
+
overlayZoom?: number;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* MUI adapter for a compensated app root.
|
|
16
|
+
*
|
|
17
|
+
* Centralizing these defaults gives every MUI overlay the portal strategy and
|
|
18
|
+
* density correction chosen by the display-scale engine.
|
|
19
|
+
*/
|
|
20
|
+
declare function createMuiDisplayScaleComponents({ getPortalContainer, overlayZoom, }: MuiDisplayScaleComponentsOptions): Components<Theme>;
|
|
21
|
+
|
|
22
|
+
type NativeAnchorProps = {
|
|
23
|
+
anchorEl?: HTMLElement | null;
|
|
24
|
+
};
|
|
25
|
+
type DisplayScaleMenuProps = Omit<MenuProps, "anchorEl"> & NativeAnchorProps;
|
|
26
|
+
/** MUI Menu with an anchor adapted to the active portal strategy. */
|
|
27
|
+
declare function DisplayScaleMenu({ anchorEl, ...props }: DisplayScaleMenuProps): ReactElement;
|
|
28
|
+
type DisplayScalePopoverProps = Omit<PopoverProps, "anchorEl"> & NativeAnchorProps;
|
|
29
|
+
/** MUI Popover with an anchor adapted to the active portal strategy. */
|
|
30
|
+
declare function DisplayScalePopover({ anchorEl, ...props }: DisplayScalePopoverProps): ReactElement;
|
|
31
|
+
type DisplayScalePopperProps = Omit<PopperProps, "anchorEl"> & NativeAnchorProps;
|
|
32
|
+
/** MUI Popper with an anchor adapted to the active portal strategy. */
|
|
33
|
+
declare function DisplayScalePopper({ anchorEl, ...props }: DisplayScalePopperProps): ReactElement;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* MUI Select adapter for the display-scale engine. Select creates its Menu
|
|
37
|
+
* internally, so it cannot use DisplayScaleMenu directly.
|
|
38
|
+
*/
|
|
39
|
+
declare function DisplayScaleSelect<Value = unknown>(props: SelectProps<Value>): ReactElement;
|
|
40
|
+
|
|
41
|
+
type DisplayScalePopoverPositionOptions = {
|
|
42
|
+
open: boolean;
|
|
43
|
+
overlayRootRef: RefObject<HTMLDivElement | null>;
|
|
44
|
+
anchorElement: HTMLElement | null;
|
|
45
|
+
anchorReference?: PopoverProps["anchorReference"];
|
|
46
|
+
anchorPosition?: PopoverProps["anchorPosition"];
|
|
47
|
+
anchorOrigin?: PopoverProps["anchorOrigin"];
|
|
48
|
+
transformOrigin?: PopoverProps["transformOrigin"];
|
|
49
|
+
marginThreshold?: PopoverProps["marginThreshold"];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Replaces only MUI Popover's physical-viewport collision pass. MUI still
|
|
53
|
+
* owns focus, transition and anchor semantics; this writes the final logical
|
|
54
|
+
* top/left inside the compensated portal root.
|
|
55
|
+
*/
|
|
56
|
+
declare function useDisplayScalePopoverPosition({ open, overlayRootRef, anchorElement, anchorReference, anchorPosition, anchorOrigin, transformOrigin, marginThreshold, }: DisplayScalePopoverPositionOptions): void;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Keeps MUI Tabs' indicator in the compensated root's logical coordinate
|
|
60
|
+
* space. MUI normally uses getBoundingClientRect(), whose values are already
|
|
61
|
+
* zoomed and therefore too small for a logical layout container.
|
|
62
|
+
*/
|
|
63
|
+
declare function useDisplayScaleTabsIndicator(tabsRef: RefObject<HTMLDivElement | null>, value: unknown): void;
|
|
64
|
+
|
|
65
|
+
/** Fill the compensated app tree — prefer over raw `100vh` inside `#root`. */
|
|
66
|
+
declare const displayScalePageFillSx: SxProps<Theme>;
|
|
67
|
+
/** Full-viewport auth split layout — fills the compensated app root (not `position: fixed`). */
|
|
68
|
+
declare const signinViewportShellSx: SxProps<Theme>;
|
|
69
|
+
/** 50/50 desktop columns — avoids flex min-content overflow at OS display scale. */
|
|
70
|
+
declare const signinSplitColumnSx: SxProps<Theme>;
|
|
71
|
+
|
|
72
|
+
export { DisplayScaleMenu, type DisplayScaleMenuProps, DisplayScalePopover, type DisplayScalePopoverProps, DisplayScalePopper, type DisplayScalePopperProps, DisplayScaleSelect, createMuiDisplayScaleComponents, displayScalePageFillSx, signinSplitColumnSx, signinViewportShellSx, useDisplayScalePopoverPosition, useDisplayScaleTabsIndicator };
|
package/dist/mui.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DisplayScaleMenu, DisplayScalePopover, DisplayScalePopper, DisplayScaleSelect, createMuiDisplayScaleComponents, displayScalePageFillSx, signinSplitColumnSx, signinViewportShellSx, useDisplayScalePopoverPosition, useDisplayScaleTabsIndicator } from './chunk-AGM7V7PR.js';
|
|
2
|
+
import './chunk-R5CTLLUS.js';
|
|
3
|
+
import './chunk-VWJNHWMD.js';
|
|
4
|
+
//# sourceMappingURL=mui.js.map
|
|
5
|
+
//# sourceMappingURL=mui.js.map
|
package/dist/mui.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"mui.js"}
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactElement, RefObject } from 'react';
|
|
2
|
+
import { C as ComputeDisplayScaleCompensationOptions, d as DisplayScaleCompensation, j as DisplayScaleLayoutExtents, a as DetectDisplayScaleOptions, S as SubscribeDisplayScaleOptions, n as DisplayScaleSnapshot, o as DisplayScaleThresholds, h as DisplayScaleEvaluation, v as getDisplayScaleLogicalViewport, l as DisplayScaleOverlayBoundsOptions } from './displayScaleLogicalViewport-Ikf-DtkQ.js';
|
|
3
|
+
|
|
4
|
+
type DisplayScaleCompensationContextValue = {
|
|
5
|
+
rootRef: RefObject<HTMLDivElement | null>;
|
|
6
|
+
compensation: DisplayScaleCompensation;
|
|
7
|
+
layoutExtents: DisplayScaleLayoutExtents | null;
|
|
8
|
+
overlayStrategy: DisplayScaleOverlayStrategy;
|
|
9
|
+
};
|
|
10
|
+
type DisplayScaleOverlayStrategy = "compensated-root" | "document-body";
|
|
11
|
+
type DisplayScaleProviderProps = PropsWithChildren & {
|
|
12
|
+
/**
|
|
13
|
+
* Visual-density policy for this app. The default keeps the existing
|
|
14
|
+
* Windows-to-100% compensation behavior.
|
|
15
|
+
*/
|
|
16
|
+
config?: ComputeDisplayScaleCompensationOptions;
|
|
17
|
+
/**
|
|
18
|
+
* Where overlay portals render. document-body keeps MUI anchor coordinates in
|
|
19
|
+
* browser-visible pixels; this is the preferred strategy for CSS zoom roots.
|
|
20
|
+
*/
|
|
21
|
+
overlayStrategy?: DisplayScaleOverlayStrategy;
|
|
22
|
+
};
|
|
23
|
+
declare function DisplayScaleCompensationProvider({ children, config, overlayStrategy, }: DisplayScaleProviderProps): ReactElement;
|
|
24
|
+
/** Package-friendly name for the display-scale root provider. */
|
|
25
|
+
declare const DisplayScaleProvider: typeof DisplayScaleCompensationProvider;
|
|
26
|
+
declare function useDisplayScaleCompensation(): DisplayScaleCompensationContextValue;
|
|
27
|
+
/**
|
|
28
|
+
* Portal target selected by the display-scale strategy.
|
|
29
|
+
*
|
|
30
|
+
* `document-body` is the default because it shares browser-visible coordinates
|
|
31
|
+
* with a native anchor; the MUI theme adapter corrects the overlay density.
|
|
32
|
+
*/
|
|
33
|
+
declare function useDisplayScalePortalContainer(): HTMLElement | null;
|
|
34
|
+
|
|
35
|
+
type UseDisplayScaleOptions = DetectDisplayScaleOptions & Pick<SubscribeDisplayScaleOptions, "debounceMs">;
|
|
36
|
+
type UseDisplayScaleResult = {
|
|
37
|
+
snapshot: DisplayScaleSnapshot;
|
|
38
|
+
evaluate: (thresholds?: DisplayScaleThresholds) => DisplayScaleEvaluation;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* React hook — reactive display zoom / scale readings for UI guards or telemetry.
|
|
42
|
+
*/
|
|
43
|
+
declare function useDisplayScale(options?: UseDisplayScaleOptions): UseDisplayScaleResult;
|
|
44
|
+
|
|
45
|
+
type DisplayScaleVirtualAnchor = {
|
|
46
|
+
contextElement: HTMLElement;
|
|
47
|
+
getBoundingClientRect: () => DOMRect;
|
|
48
|
+
nodeType: 1;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Converts an anchor rectangle from visible browser pixels to the coordinate
|
|
52
|
+
* space of the compensated engine root. The return value is accepted by MUI
|
|
53
|
+
* Menu, Popover and Popper as a virtual anchor.
|
|
54
|
+
*/
|
|
55
|
+
declare function useDisplayScaleAnchor(anchorElement: HTMLElement | null): HTMLElement | DisplayScaleVirtualAnchor | null;
|
|
56
|
+
|
|
57
|
+
type DisplayScaleOverlay = {
|
|
58
|
+
/** MUI portal target selected by the engine strategy. */
|
|
59
|
+
portalContainer: HTMLElement | null;
|
|
60
|
+
logicalViewport: ReturnType<typeof getDisplayScaleLogicalViewport>;
|
|
61
|
+
toLogicalPixels: (value: number) => number;
|
|
62
|
+
/** Converts a visible size to the CSS size required by density-zoomed content. */
|
|
63
|
+
toOverlayContentPixels: (value: number) => number;
|
|
64
|
+
getMaxHeightBelowAnchor: (anchor: HTMLElement, options?: DisplayScaleOverlayBoundsOptions) => number;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Overlay geometry adapter. Use this instead of dividing coordinates by the
|
|
68
|
+
* display-scale zoom in feature code.
|
|
69
|
+
*/
|
|
70
|
+
declare function useDisplayScaleOverlay(): DisplayScaleOverlay;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Tests a breakpoint against the compensated root width rather than the raw
|
|
74
|
+
* browser viewport. Use for app-shell decisions that must preserve the same
|
|
75
|
+
* layout at Windows 100% and compensated 150%.
|
|
76
|
+
*/
|
|
77
|
+
declare function useLogicalMinWidth(minWidth: number): boolean;
|
|
78
|
+
/** Logical counterpart to a max-width media query. */
|
|
79
|
+
declare function useLogicalMaxWidth(maxWidth: number): boolean;
|
|
80
|
+
|
|
81
|
+
export { DisplayScaleCompensationProvider, type DisplayScaleOverlay, type DisplayScaleOverlayStrategy, DisplayScaleProvider, type DisplayScaleProviderProps, type DisplayScaleVirtualAnchor, useDisplayScale, useDisplayScaleAnchor, useDisplayScaleCompensation, useDisplayScaleOverlay, useDisplayScalePortalContainer, useLogicalMaxWidth, useLogicalMinWidth };
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { useDisplayScaleOverlay, useLogicalMaxWidth, useLogicalMinWidth } from './chunk-6UB65SJB.js';
|
|
2
|
+
import './chunk-U3ZWHUJG.js';
|
|
3
|
+
export { DisplayScaleCompensationProvider, DisplayScaleProvider, useDisplayScale, useDisplayScaleAnchor, useDisplayScaleCompensation, useDisplayScalePortalContainer } from './chunk-R5CTLLUS.js';
|
|
4
|
+
import './chunk-VWJNHWMD.js';
|
|
5
|
+
//# sourceMappingURL=react.js.map
|
|
6
|
+
//# sourceMappingURL=react.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"react.js"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# Display-scale engine
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
The display-scale engine provides an optional **visual-density lock** for Windows desktop browsers.
|
|
6
|
+
When Windows display scale is 125%, 150%, or another supported tier, the app can render toward a
|
|
7
|
+
100% visual-density target while retaining an expanded logical layout area.
|
|
8
|
+
|
|
9
|
+
This is a product policy, not a browser requirement. A conventional responsive website should not
|
|
10
|
+
enable this behavior unless matching 100% visual density is an explicit requirement.
|
|
11
|
+
|
|
12
|
+
## Scope and limitations
|
|
13
|
+
|
|
14
|
+
- The engine targets Windows desktop and is disabled for coarse-pointer and compact viewports.
|
|
15
|
+
- Browser page zoom and OS display scale are not perfectly distinguishable in a normal browser.
|
|
16
|
+
`window.devicePixelRatio` is an effective value influenced by both.
|
|
17
|
+
- The session baseline assumes browser page zoom is 100% when first stored. If this is not true,
|
|
18
|
+
call `recalibrateDisplayScale()` after the user resets page zoom to 100%.
|
|
19
|
+
- Native shells such as Electron can provide a more authoritative OS scale factor. A pure web app
|
|
20
|
+
cannot.
|
|
21
|
+
|
|
22
|
+
## Architecture
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
display-scale core
|
|
26
|
+
detection + calibration + compensation policy
|
|
27
|
+
|
|
|
28
|
+
v
|
|
29
|
+
React provider
|
|
30
|
+
compensated root (visible portal host) + logical viewport context
|
|
31
|
+
|
|
|
32
|
+
+-- clipped app-content layer
|
|
33
|
+
+-- document-body MUI portal host
|
|
34
|
+
+-- overlay adapter
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The code is intentionally divided so that the core calculation modules do not depend on React or
|
|
38
|
+
MUI. The React-facing API is exported from `@/shared/display-scale` today and can be moved into
|
|
39
|
+
an internal package without changing feature call sites.
|
|
40
|
+
|
|
41
|
+
## Public API
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
import {
|
|
45
|
+
DisplayScaleProvider,
|
|
46
|
+
useDisplayScale,
|
|
47
|
+
useDisplayScaleOverlay,
|
|
48
|
+
} from "@/shared/display-scale";
|
|
49
|
+
|
|
50
|
+
<DisplayScaleProvider
|
|
51
|
+
config={{
|
|
52
|
+
windowsOnly: true,
|
|
53
|
+
targetOsScale: 1,
|
|
54
|
+
minOsScaleToCompensate: 1.05,
|
|
55
|
+
requireExplicitCalibration: true,
|
|
56
|
+
}}
|
|
57
|
+
>
|
|
58
|
+
<App />
|
|
59
|
+
</DisplayScaleProvider>;
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Core utilities
|
|
63
|
+
|
|
64
|
+
- `detectDisplayScale()`: returns current DPR, estimated OS scale, estimated browser zoom and
|
|
65
|
+
confidence.
|
|
66
|
+
- `recalibrateDisplayScale()`: replaces the current session baseline when browser zoom is known
|
|
67
|
+
to be 100% and marks it as explicit calibration.
|
|
68
|
+
- `computeDisplayScaleCompensation()`: resolves whether compensation is active and the target
|
|
69
|
+
root zoom.
|
|
70
|
+
- `getDisplayScaleLogicalViewport()`: returns browser viewport and compensated-root viewport.
|
|
71
|
+
- `toDisplayScaleLogicalPixels()`: converts visible CSS-pixel geometry to root coordinates.
|
|
72
|
+
|
|
73
|
+
### React utilities
|
|
74
|
+
|
|
75
|
+
- `DisplayScaleProvider`: package-friendly name for the existing root provider.
|
|
76
|
+
- `useDisplayScale()`: subscribes to a scale snapshot.
|
|
77
|
+
- `useDisplayScaleCompensation()`: exposes the root and resolved compensation.
|
|
78
|
+
- `useDisplayScaleOverlay()`: obtains the portal container, logical viewport and overlay bounds
|
|
79
|
+
helpers, including `toOverlayContentPixels()` for a custom density-zoomed dimension.
|
|
80
|
+
- `useDisplayScaleAnchor()`: converts a native anchor to a MUI-compatible virtual anchor in the
|
|
81
|
+
compensated portal coordinate space.
|
|
82
|
+
- `useLogicalMinWidth()` / `useLogicalMaxWidth()`: evaluate app-shell breakpoints against the
|
|
83
|
+
compensated root width.
|
|
84
|
+
- `createMuiDisplayScaleComponents()`: optional MUI adapter that centralizes portal defaults for
|
|
85
|
+
Dialog, Menu/Popover and Popper.
|
|
86
|
+
|
|
87
|
+
## Overlay integration
|
|
88
|
+
|
|
89
|
+
MUI overlays must share the same coordinate system as their anchor. The theme adapter keeps legacy
|
|
90
|
+
MUI portals on `document.body` with density correction. For anchored `Menu`, `Popover` and
|
|
91
|
+
`Popper`, use the provided wrappers: they move only that overlay into the compensated root and
|
|
92
|
+
adapt the anchor rectangle relative to the engine root centrally. This avoids the `top`/`left`
|
|
93
|
+
drift caused by applying CSS zoom to an absolutely positioned body portal. The adapter also handles temporary MUI Drawers: the
|
|
94
|
+
portal host, density zoom, and inverse viewport dimension are set globally. Permanent and
|
|
95
|
+
persistent Drawers remain inside the compensated root and are deliberately untouched.
|
|
96
|
+
|
|
97
|
+
The compensated root is intentionally a visible portal host. The app content sits in a clipped
|
|
98
|
+
child layer, so a portalled overlay is bounded by the real viewport rather than an invisible
|
|
99
|
+
`overflow: hidden` root rectangle.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
Use `overlayStrategy="compensated-root"` only for an app that has verified every portal and
|
|
103
|
+
anchor in logical root coordinates. `document-body` is preferred for CSS zoom roots.
|
|
104
|
+
|
|
105
|
+
Do not divide a Popper or Menu height by `compensation.zoom` in feature code. Use the overlay
|
|
106
|
+
adapter instead; it uses visible pixels for placement and converts only an overlay content
|
|
107
|
+
dimension when its density zoom requires it:
|
|
108
|
+
|
|
109
|
+
```tsx
|
|
110
|
+
const { getMaxHeightBelowAnchor } = useDisplayScaleOverlay();
|
|
111
|
+
|
|
112
|
+
const maxHeight = getMaxHeightBelowAnchor(anchorElement, {
|
|
113
|
+
offset: 8,
|
|
114
|
+
viewportInset: 16,
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
For MUI `Menu`, `Popover` and `Popper`, adapt the anchor before passing it to the component:
|
|
119
|
+
|
|
120
|
+
```tsx
|
|
121
|
+
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);
|
|
122
|
+
const displayScaleAnchor = useDisplayScaleAnchor(anchorEl);
|
|
123
|
+
|
|
124
|
+
<Menu anchorEl={displayScaleAnchor} open={Boolean(anchorEl)} />;
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
For new code, prefer the MUI wrappers so the conversion cannot be skipped:
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
import { DisplayScaleMenu, DisplayScalePopover, DisplayScalePopper } from "@/shared/display-scale";
|
|
131
|
+
|
|
132
|
+
<DisplayScaleMenu anchorEl={anchorEl} open={Boolean(anchorEl)} />;
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The wrappers accept a native `HTMLElement` anchor, and also support a Menu using
|
|
136
|
+
`anchorReference="anchorPosition"`. Use the lower-level hook only for components that require a
|
|
137
|
+
custom virtual anchor.
|
|
138
|
+
|
|
139
|
+
For engine wrappers, MUI still performs its initial placement. The engine then replaces only the
|
|
140
|
+
final collision clamp with a logical-viewport calculation, preserving MUI focus handling,
|
|
141
|
+
transitions and origin semantics. `Popper` is intentionally separate because it uses Popper.js
|
|
142
|
+
modifiers rather than MUI Popover's collision implementation.
|
|
143
|
+
|
|
144
|
+
For custom positioning:
|
|
145
|
+
|
|
146
|
+
1. Read the anchor rectangle with `getBoundingClientRect()`.
|
|
147
|
+
2. Let `useDisplayScaleOverlay()` convert geometry only when the active portal strategy needs it.
|
|
148
|
+
3. Keep the anchor, portal host and overlay in the same strategy.
|
|
149
|
+
4. Give scrollable content `minHeight: 0` and put `overflowY: "auto"` on the list surface.
|
|
150
|
+
5. Prefer Popper modifiers (`offset`, `flip`, `preventOverflow`) over hard-coded
|
|
151
|
+
`position: fixed`, `top` or `right`.
|
|
152
|
+
|
|
153
|
+
## Responsive guidance
|
|
154
|
+
|
|
155
|
+
Visual density and responsive behavior are separate:
|
|
156
|
+
|
|
157
|
+
- **Density** controls perceived font, component and spacing size.
|
|
158
|
+
- **Responsive behavior** controls breakpoints, columns and navigation variants.
|
|
159
|
+
- **Overlay geometry** controls portals and viewport bounds.
|
|
160
|
+
|
|
161
|
+
Browser-level media queries still observe the browser CSS viewport. Features that must preserve the
|
|
162
|
+
same breakpoint behavior at 100% and 150% should use container queries within the compensated root
|
|
163
|
+
or `useLogicalMinWidth()` / `useLogicalMaxWidth()` for JavaScript app-shell decisions. Do not
|
|
164
|
+
assume root `zoom` changes `window.matchMedia()`.
|
|
165
|
+
|
|
166
|
+
## Migration plan for another React app
|
|
167
|
+
|
|
168
|
+
1. Copy or package only `displayScaleCompensation`, `detectDisplayScale`, baseline storage,
|
|
169
|
+
types and logical viewport utilities as the core layer.
|
|
170
|
+
2. Add `DisplayScaleProvider` around the new app shell.
|
|
171
|
+
3. Configure the app's portal system with `createMuiDisplayScaleComponents()`.
|
|
172
|
+
4. Migrate overlays first, then fixed-position pages, then breakpoint-sensitive layouts.
|
|
173
|
+
5. For strict density lock, set `requireExplicitCalibration: true` and call
|
|
174
|
+
`recalibrateDisplayScale()` after the app confirms that browser zoom is 100%.
|
|
175
|
+
|
|
176
|
+
Suggested future package structure:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
@envidi/display-scale-core
|
|
180
|
+
@envidi/display-scale-react
|
|
181
|
+
@envidi/display-scale-mui
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The MUI package should remain optional; core must not import MUI.
|
|
185
|
+
|
|
186
|
+
## Verification matrix
|
|
187
|
+
|
|
188
|
+
Run the following with browser page zoom at 100%, then repeat at 80%, 125% and 150%:
|
|
189
|
+
|
|
190
|
+
| Windows display scale | Required result |
|
|
191
|
+
| --- | --- |
|
|
192
|
+
| 100% | No compensation; baseline visual layout |
|
|
193
|
+
| 125% | Target visual density; no overlay clipping |
|
|
194
|
+
| 150% | Target visual density; no overlay drift or viewport overflow |
|
|
195
|
+
| Multiple monitors | Re-read scale after the window moves; recalibrate if confidence is insufficient |
|
|
196
|
+
|
|
197
|
+
Check at minimum: app shell, sidebar animation, dialogs, menus, Popper lists, fixed controls,
|
|
198
|
+
virtualized or scrollable lists, responsive grids and sign-in.
|
|
199
|
+
|
|
200
|
+
## Current known work
|
|
201
|
+
|
|
202
|
+
- Factory selector uses `useDisplayScaleOverlay()` for viewport-bounded list height.
|
|
203
|
+
- MUI portals are globally routed to `document.body` by default; the theme adapter applies the
|
|
204
|
+
matching overlay density there, avoiding coordinate drift from the compensated root.
|
|
205
|
+
- The app shell and sidebar profile already use logical breakpoints. Dashboard grids and other
|
|
206
|
+
feature-level breakpoint consumers remain a staged migration.
|
|
207
|
+
- The engine currently uses best-effort browser-zoom detection; explicit calibration UX remains a
|
|
208
|
+
follow-up before enabling strict density lock across other apps.
|
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-display-scale-engine",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "React and Material UI utilities for consistent Windows display-scale rendering.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./core": {
|
|
17
|
+
"types": "./dist/core.d.ts",
|
|
18
|
+
"import": "./dist/core.js"
|
|
19
|
+
},
|
|
20
|
+
"./react": {
|
|
21
|
+
"types": "./dist/react.d.ts",
|
|
22
|
+
"import": "./dist/react.js"
|
|
23
|
+
},
|
|
24
|
+
"./mui": {
|
|
25
|
+
"types": "./dist/mui.d.ts",
|
|
26
|
+
"import": "./dist/mui.js"
|
|
27
|
+
},
|
|
28
|
+
"./package.json": "./package.json"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"bin",
|
|
33
|
+
"docs",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"bin": {
|
|
38
|
+
"rds-engine": "bin/rds-engine.mjs"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"build": "tsup",
|
|
42
|
+
"typecheck": "tsc --noEmit",
|
|
43
|
+
"check": "npm run typecheck && npm run build",
|
|
44
|
+
"pack:check": "npm pack --dry-run",
|
|
45
|
+
"release:check": "node ./bin/rds-engine.mjs check",
|
|
46
|
+
"release:dry-run": "node ./bin/rds-engine.mjs publish --dry-run",
|
|
47
|
+
"release:publish": "node ./bin/rds-engine.mjs publish"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"react",
|
|
51
|
+
"mui",
|
|
52
|
+
"material-ui",
|
|
53
|
+
"windows",
|
|
54
|
+
"display-scale",
|
|
55
|
+
"dpi",
|
|
56
|
+
"popover"
|
|
57
|
+
],
|
|
58
|
+
"peerDependencies": {
|
|
59
|
+
"@emotion/react": ">=11.0.0",
|
|
60
|
+
"@emotion/styled": ">=11.0.0",
|
|
61
|
+
"@mui/material": ">=5.0.0",
|
|
62
|
+
"@popperjs/core": ">=2.0.0",
|
|
63
|
+
"react": ">=18.0.0",
|
|
64
|
+
"react-dom": ">=18.0.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@emotion/react": "^11.14.0",
|
|
68
|
+
"@emotion/styled": "^11.14.0",
|
|
69
|
+
"@mui/material": "^7.3.5",
|
|
70
|
+
"@popperjs/core": "^2.11.8",
|
|
71
|
+
"@types/node": "^22.10.0",
|
|
72
|
+
"@types/react": "^19.0.0",
|
|
73
|
+
"@types/react-dom": "^19.0.0",
|
|
74
|
+
"react": "^19.0.0",
|
|
75
|
+
"react-dom": "^19.0.0",
|
|
76
|
+
"tsup": "^8.5.1",
|
|
77
|
+
"typescript": "^5.7.0"
|
|
78
|
+
},
|
|
79
|
+
"publishConfig": {
|
|
80
|
+
"access": "public"
|
|
81
|
+
},
|
|
82
|
+
"engines": {
|
|
83
|
+
"node": ">=18"
|
|
84
|
+
}
|
|
85
|
+
}
|