@zendir/ui 0.7.0 → 0.7.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/CHANGELOG.md +14 -0
- package/dist/index.js +2 -2
- package/dist/react/charts/GroundTrackMapLeaflet.js +19 -1
- package/dist/react/charts/GroundTrackMapLeaflet.js.map +1 -1
- package/dist/react/charts/groundTrackMapLeafletTiles.d.ts +16 -6
- package/dist/react/charts/groundTrackMapLeafletTiles.js +19 -5
- package/dist/react/charts/groundTrackMapLeafletTiles.js.map +1 -1
- package/dist/react/charts/index.d.ts +1 -1
- package/dist/react/charts/index.js +2 -2
- package/dist/react/core/widgets/HexViewer.js +49 -29
- package/dist/react/core/widgets/HexViewer.js.map +1 -1
- package/dist/react.js +2 -2
- package/package.json +1 -1
|
@@ -3,15 +3,25 @@
|
|
|
3
3
|
* Import and use as `tileUrl` to switch between map themes.
|
|
4
4
|
*/
|
|
5
5
|
export declare const TILE_PRESETS: {
|
|
6
|
-
/**
|
|
7
|
-
readonly dark: "https://
|
|
6
|
+
/** Esri Dark Gray Canvas — default space ops aesthetic. */
|
|
7
|
+
readonly dark: "https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}";
|
|
8
8
|
/** Esri World Imagery — natural satellite photos, makes the terminator dramatically visible. */
|
|
9
9
|
readonly satellite: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}";
|
|
10
|
-
/**
|
|
11
|
-
readonly light: "https://
|
|
10
|
+
/** Esri Light Gray Canvas — light/neutral. */
|
|
11
|
+
readonly light: "https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}";
|
|
12
12
|
};
|
|
13
|
-
/** Primary basemap:
|
|
14
|
-
export declare const DEFAULT_TILE = "https://
|
|
13
|
+
/** Primary basemap: Esri Dark Gray Canvas. */
|
|
14
|
+
export declare const DEFAULT_TILE = "https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}";
|
|
15
|
+
/**
|
|
16
|
+
* Place-name overlays for the Canvas basemaps, which bake labels into the base
|
|
17
|
+
* tiles only at world scale. Drawn above the base so names survive past zoom ~6.
|
|
18
|
+
*/
|
|
19
|
+
export declare const CANVAS_LABEL_TILES: Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Esri Canvas (Dark/Light Gray) basemaps — the reference layers share these terms.
|
|
22
|
+
* @see https://developers.arcgis.com/documentation/mapping-apis-and-services/deployment/basemap-attribution/
|
|
23
|
+
*/
|
|
24
|
+
export declare const ESRI_CANVAS_ATTRIBUTION: string;
|
|
15
25
|
export declare const CARTO_ATTRIBUTION = "© <a href=\"https://carto.com/attribution\" target=\"_blank\" rel=\"noopener noreferrer\">CARTO</a>";
|
|
16
26
|
/** Fallback when primary tiles fail to avoid black tiles. */
|
|
17
27
|
export declare const FALLBACK_TILE = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
@@ -4,13 +4,26 @@
|
|
|
4
4
|
* Import and use as `tileUrl` to switch between map themes.
|
|
5
5
|
*/
|
|
6
6
|
var TILE_PRESETS = {
|
|
7
|
-
/**
|
|
8
|
-
dark: "https://
|
|
7
|
+
/** Esri Dark Gray Canvas — default space ops aesthetic. */
|
|
8
|
+
dark: "https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}",
|
|
9
9
|
/** Esri World Imagery — natural satellite photos, makes the terminator dramatically visible. */
|
|
10
10
|
satellite: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
|
|
11
|
-
/**
|
|
12
|
-
light: "https://
|
|
11
|
+
/** Esri Light Gray Canvas — light/neutral. */
|
|
12
|
+
light: "https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}"
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Place-name overlays for the Canvas basemaps, which bake labels into the base
|
|
16
|
+
* tiles only at world scale. Drawn above the base so names survive past zoom ~6.
|
|
17
|
+
*/
|
|
18
|
+
var CANVAS_LABEL_TILES = {
|
|
19
|
+
[TILE_PRESETS.dark]: "https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}",
|
|
20
|
+
[TILE_PRESETS.light]: "https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}"
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Esri Canvas (Dark/Light Gray) basemaps — the reference layers share these terms.
|
|
24
|
+
* @see https://developers.arcgis.com/documentation/mapping-apis-and-services/deployment/basemap-attribution/
|
|
25
|
+
*/
|
|
26
|
+
var ESRI_CANVAS_ATTRIBUTION = "Tiles © <a href=\"https://www.esri.com/\" target=\"_blank\" rel=\"noopener noreferrer\">Esri</a> — Source: Esri, HERE, Garmin, © OpenStreetMap contributors, and the GIS user community";
|
|
14
27
|
var CARTO_ATTRIBUTION = "© <a href=\"https://carto.com/attribution\" target=\"_blank\" rel=\"noopener noreferrer\">CARTO</a>";
|
|
15
28
|
/** Fallback when primary tiles fail to avoid black tiles. */
|
|
16
29
|
var FALLBACK_TILE = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
|
|
@@ -27,11 +40,12 @@ var ESRI_WORLD_IMAGERY_ATTRIBUTION = "Tiles © <a href=\"https://www.esri.co
|
|
|
27
40
|
function getBasemapAttribution(tileUrl) {
|
|
28
41
|
const u = tileUrl.toLowerCase();
|
|
29
42
|
if (u.includes("cartocdn")) return CARTO_ATTRIBUTION;
|
|
43
|
+
if (u.includes("/canvas/")) return ESRI_CANVAS_ATTRIBUTION;
|
|
30
44
|
if (u.includes("arcgisonline.com") || u.includes("arcgis.com")) return ESRI_WORLD_IMAGERY_ATTRIBUTION;
|
|
31
45
|
if (u.includes("openstreetmap.org")) return OSM_ATTRIBUTION;
|
|
32
46
|
return "";
|
|
33
47
|
}
|
|
34
48
|
//#endregion
|
|
35
|
-
export { CARTO_ATTRIBUTION, ESRI_WORLD_IMAGERY_ATTRIBUTION, FALLBACK_TILE, OSM_ATTRIBUTION, TILE_PRESETS, getBasemapAttribution };
|
|
49
|
+
export { CANVAS_LABEL_TILES, CARTO_ATTRIBUTION, ESRI_CANVAS_ATTRIBUTION, ESRI_WORLD_IMAGERY_ATTRIBUTION, FALLBACK_TILE, OSM_ATTRIBUTION, TILE_PRESETS, getBasemapAttribution };
|
|
36
50
|
|
|
37
51
|
//# sourceMappingURL=groundTrackMapLeafletTiles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groundTrackMapLeafletTiles.js","names":[],"sources":["../../../src/react/charts/groundTrackMapLeafletTiles.ts"],"sourcesContent":["/**\r\n * Tile layer URL presets for common map styles.\r\n * Import and use as `tileUrl` to switch between map themes.\r\n */\r\nexport const TILE_PRESETS = {\r\n /**
|
|
1
|
+
{"version":3,"file":"groundTrackMapLeafletTiles.js","names":[],"sources":["../../../src/react/charts/groundTrackMapLeafletTiles.ts"],"sourcesContent":["/**\r\n * Tile layer URL presets for common map styles.\r\n * Import and use as `tileUrl` to switch between map themes.\r\n */\r\nexport const TILE_PRESETS = {\r\n /** Esri Dark Gray Canvas — default space ops aesthetic. */\r\n dark: \"https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}\",\r\n /** Esri World Imagery — natural satellite photos, makes the terminator dramatically visible. */\r\n satellite:\r\n \"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}\",\r\n /** Esri Light Gray Canvas — light/neutral. */\r\n light:\r\n \"https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}\",\r\n} as const;\r\n\r\n/** Primary basemap: Esri Dark Gray Canvas. */\r\nexport const DEFAULT_TILE =\r\n \"https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer/tile/{z}/{y}/{x}\";\r\n\r\n/**\r\n * Place-name overlays for the Canvas basemaps, which bake labels into the base\r\n * tiles only at world scale. Drawn above the base so names survive past zoom ~6.\r\n */\r\nexport const CANVAS_LABEL_TILES: Record<string, string> = {\r\n [TILE_PRESETS.dark]:\r\n \"https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Reference/MapServer/tile/{z}/{y}/{x}\",\r\n [TILE_PRESETS.light]:\r\n \"https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer/tile/{z}/{y}/{x}\",\r\n};\r\n\r\n/**\r\n * Esri Canvas (Dark/Light Gray) basemaps — the reference layers share these terms.\r\n * @see https://developers.arcgis.com/documentation/mapping-apis-and-services/deployment/basemap-attribution/\r\n */\r\nexport const ESRI_CANVAS_ATTRIBUTION =\r\n 'Tiles © <a href=\"https://www.esri.com/\" target=\"_blank\" rel=\"noopener noreferrer\">Esri</a> ' +\r\n \"— Source: Esri, HERE, Garmin, © OpenStreetMap contributors, and the GIS user community\";\r\n\r\nexport const CARTO_ATTRIBUTION =\r\n '© <a href=\"https://carto.com/attribution\" target=\"_blank\" rel=\"noopener noreferrer\">CARTO</a>';\r\n\r\n/** Fallback when primary tiles fail to avoid black tiles. */\r\nexport const FALLBACK_TILE =\r\n \"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\";\r\n\r\nexport const OSM_ATTRIBUTION =\r\n '© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\" rel=\"noopener noreferrer\">OpenStreetMap contributors</a>';\r\n\r\n/**\r\n * Esri World Imagery — required when using tiles from ArcGIS Online MapServer.\r\n * @see https://developers.arcgis.com/documentation/mapping-apis-and-services/deployment/basemap-attribution/\r\n */\r\nexport const ESRI_WORLD_IMAGERY_ATTRIBUTION =\r\n 'Tiles © <a href=\"https://www.esri.com/\" target=\"_blank\" rel=\"noopener noreferrer\">Esri</a> ' +\r\n \"— Source: Esri, Maxar, Earthstar Geographics, and the GIS User Community\";\r\n\r\n/**\r\n * Resolve HTML attribution for a basemap URL template (Leaflet `TileLayer` `attribution` option).\r\n * Unknown / custom URLs return an empty string — apps should document their own terms for those.\r\n */\r\nexport function getBasemapAttribution(tileUrl: string): string {\r\n const u = tileUrl.toLowerCase();\r\n if (u.includes(\"cartocdn\")) return CARTO_ATTRIBUTION;\r\n if (u.includes(\"/canvas/\")) return ESRI_CANVAS_ATTRIBUTION;\r\n if (u.includes(\"arcgisonline.com\") || u.includes(\"arcgis.com\"))\r\n return ESRI_WORLD_IMAGERY_ATTRIBUTION;\r\n if (u.includes(\"openstreetmap.org\")) return OSM_ATTRIBUTION;\r\n return \"\";\r\n}\r\n\r\n/**\r\n * After this many consecutive tile errors, switch to the fallback layer.\r\n * Set to 1 so we bail out immediately on the first network failure instead\r\n * of waiting for several timeouts (which shows a black map for ~5 seconds).\r\n */\r\nexport const TILE_ERROR_THRESHOLD = 1;\r\n"],"mappings":";;;;;AAIA,IAAa,eAAe;;CAE1B,MAAM;;CAEN,WACE;;CAEF,OACE;AACJ;;;;;AAUA,IAAa,qBAA6C;EACvD,aAAa,OACZ;EACD,aAAa,QACZ;AACJ;;;;;AAMA,IAAa,0BACX;AAGF,IAAa,oBACX;;AAGF,IAAa,gBACX;AAEF,IAAa,kBACX;;;;;AAMF,IAAa,iCACX;;;;;AAOF,SAAgB,sBAAsB,SAAyB;CAC7D,MAAM,IAAI,QAAQ,YAAY;CAC9B,IAAI,EAAE,SAAS,UAAU,GAAG,OAAO;CACnC,IAAI,EAAE,SAAS,UAAU,GAAG,OAAO;CACnC,IAAI,EAAE,SAAS,kBAAkB,KAAK,EAAE,SAAS,YAAY,GAC3D,OAAO;CACT,IAAI,EAAE,SAAS,mBAAmB,GAAG,OAAO;CAC5C,OAAO;AACT"}
|
|
@@ -8,4 +8,4 @@ export type { AstroChartHandle, AstroChartProps, ChartType, ChartTheme, DataPoin
|
|
|
8
8
|
PowerChartProps, AttitudeChartProps, ThermalHeatmapChartProps, LinkBudgetChartProps, SubsystemGaugeProps, OrbitChartProps, ContactWindowChartProps, SpectrumChartProps, ManeuverBudgetChartProps, EclipseTimelineChartProps, RoseDiagramProps, HeliocentricOrbitProps, Scatter3DChartProps, Bar3DChartProps, Surface3DChartProps, Lines3DChartProps, SphericalRadar3DChartProps, SphericalRadar3DData, TransferOrbit3DChartProps, TransferOrbitSegment, TransferOrbitWaypoint, AttitudeHistory3DChartProps, AttitudeHistoryPoint, ConjunctionAssessment3DChartProps, ConjunctionEvent, LaunchCorridor3DChartProps, LaunchCorridorData, AntennaPattern3DChartProps, AntennaPattern3DData, WaterfallChartProps, DopplerTrackChartProps, LinkMarginChartProps, ConstellationCoverageChartProps, ConjunctionChartProps, WaterfallDataPoint, WaterfallSignalMarker, DopplerTrackPoint, SatellitePassInfo, LinkMarginPoint, CoverageGridData, PowerGeneratorConfig, AttitudeGeneratorConfig, DopplerGeneratorConfig, WaterfallGeneratorConfig, ContactGeneratorConfig, HeliocentricGeneratorConfig, SpectrumGeneratorConfig, EclipseGeneratorConfig, CoverageGeneratorConfig, ConjunctionGeneratorConfig, PowerOverviewChartProps, PowerTimelinePoint, PowerEvent, PowerState, OperationalMode, EventType, PowerEventType, StreamOptions, StreamController, WebSocketStreamOptions, WebSocketStreamController, UseChartSyncOptions, EChartsTheme, } from './unified';
|
|
9
9
|
export { GroundTrackMap } from './GroundTrackMap';
|
|
10
10
|
export type { GroundTrackMapProps, SatelliteTrack, GroundStationEnhanced, TeamPath, SROGroundStation, MapPin, LightSource, MapLayerDef, } from './GroundTrackMap';
|
|
11
|
-
export { TILE_PRESETS, CARTO_ATTRIBUTION, OSM_ATTRIBUTION, ESRI_WORLD_IMAGERY_ATTRIBUTION, getBasemapAttribution, } from './groundTrackMapLeafletTiles';
|
|
11
|
+
export { TILE_PRESETS, CANVAS_LABEL_TILES, CARTO_ATTRIBUTION, OSM_ATTRIBUTION, ESRI_WORLD_IMAGERY_ATTRIBUTION, ESRI_CANVAS_ATTRIBUTION, getBasemapAttribution, } from './groundTrackMapLeafletTiles';
|
|
@@ -7,5 +7,5 @@ import { PowerOverviewChart, generateSamplePowerData } from "./unified/PowerOver
|
|
|
7
7
|
import { useChartStream, useWebSocketStream } from "./unified/useChartStream.js";
|
|
8
8
|
import { dispatchToGroup, exportGroupAsCSV, exportGroupAsImages, getGroupCharts, hideGroupTooltip, resetGroupZoom, showGroupTooltip, syncZoomRange, useChartSync } from "./unified/sync.js";
|
|
9
9
|
import { GroundTrackMap } from "./GroundTrackMap.js";
|
|
10
|
-
import { CARTO_ATTRIBUTION, ESRI_WORLD_IMAGERY_ATTRIBUTION, OSM_ATTRIBUTION, TILE_PRESETS, getBasemapAttribution } from "./groundTrackMapLeafletTiles.js";
|
|
11
|
-
export { ASTRO_DATA_VIZ_COLORS, AntennaPattern3DChart, AreaChart, AstroChart, AttitudeChart, AttitudeHistory3DChart, Bar3DChart, BarChart, BoxPlotChart, BubbleChart, CARTO_ATTRIBUTION, CandlestickChart, ConjunctionAssessment3DChart, ConjunctionChart, ConstellationCoverageChart, ContactWindowChart, DonutChart, DopplerTrackChart, DualAxisChart, ESRI_WORLD_IMAGERY_ATTRIBUTION, EclipseTimelineChart, GaugeChart, GraphChart, GroundTrackMap, HeatmapChart, HeliocentricOrbitPlot, HistogramChart, LaunchCorridor3DChart, LineChart, Lines3DChart, LinkBudgetChart, LinkMarginChart, ManeuverBudgetChart, OFFICIAL_ASTRO_DATA_VIZ_COLORS, OSM_ATTRIBUTION, OrbitChart, ParallelChart, PieChart, PowerChart, PowerOverviewChart, RadarChart, RoseDiagram, STATUS_COLORS, SankeyChart, Scatter3DChart, ScatterChart, SpectrumChart, SphericalRadar3DChart, StackedAreaChart, StackedBarChart, SubsystemGauge, SunburstChart, Surface3DChart, TILE_PRESETS, ThermalHeatmapChart, TimeSeriesChart, TransferOrbit3DChart, TreemapChart, WaterfallChart, ZENDIR_BRAND_COLORS, calculateAxisBounds, createAreaGradient, createAstroEChartsTheme, dispatchToGroup, exportGroupAsCSV, exportGroupAsImages, formatTimeLabel, formatValueWithUnit, generateAttitudeData, generateConjunctionEvents, generateConstellationCoverage, generateContactWindows, generateDopplerData, generateEclipseTimeline, generateHeliocentricOrbits, generatePowerData, generateSamplePowerData, generateSpectrum, generateWaterfallData, getBasemapAttribution, getGroupCharts, getPaletteForDataType, getSeriesColor, getStatusColor, hideGroupTooltip, resetGroupZoom, showGroupTooltip, syncZoomRange, useChartStream, useChartSync, useWebSocketStream };
|
|
10
|
+
import { CANVAS_LABEL_TILES, CARTO_ATTRIBUTION, ESRI_CANVAS_ATTRIBUTION, ESRI_WORLD_IMAGERY_ATTRIBUTION, OSM_ATTRIBUTION, TILE_PRESETS, getBasemapAttribution } from "./groundTrackMapLeafletTiles.js";
|
|
11
|
+
export { ASTRO_DATA_VIZ_COLORS, AntennaPattern3DChart, AreaChart, AstroChart, AttitudeChart, AttitudeHistory3DChart, Bar3DChart, BarChart, BoxPlotChart, BubbleChart, CANVAS_LABEL_TILES, CARTO_ATTRIBUTION, CandlestickChart, ConjunctionAssessment3DChart, ConjunctionChart, ConstellationCoverageChart, ContactWindowChart, DonutChart, DopplerTrackChart, DualAxisChart, ESRI_CANVAS_ATTRIBUTION, ESRI_WORLD_IMAGERY_ATTRIBUTION, EclipseTimelineChart, GaugeChart, GraphChart, GroundTrackMap, HeatmapChart, HeliocentricOrbitPlot, HistogramChart, LaunchCorridor3DChart, LineChart, Lines3DChart, LinkBudgetChart, LinkMarginChart, ManeuverBudgetChart, OFFICIAL_ASTRO_DATA_VIZ_COLORS, OSM_ATTRIBUTION, OrbitChart, ParallelChart, PieChart, PowerChart, PowerOverviewChart, RadarChart, RoseDiagram, STATUS_COLORS, SankeyChart, Scatter3DChart, ScatterChart, SpectrumChart, SphericalRadar3DChart, StackedAreaChart, StackedBarChart, SubsystemGauge, SunburstChart, Surface3DChart, TILE_PRESETS, ThermalHeatmapChart, TimeSeriesChart, TransferOrbit3DChart, TreemapChart, WaterfallChart, ZENDIR_BRAND_COLORS, calculateAxisBounds, createAreaGradient, createAstroEChartsTheme, dispatchToGroup, exportGroupAsCSV, exportGroupAsImages, formatTimeLabel, formatValueWithUnit, generateAttitudeData, generateConjunctionEvents, generateConstellationCoverage, generateContactWindows, generateDopplerData, generateEclipseTimeline, generateHeliocentricOrbits, generatePowerData, generateSamplePowerData, generateSpectrum, generateWaterfallData, getBasemapAttribution, getGroupCharts, getPaletteForDataType, getSeriesColor, getStatusColor, hideGroupTooltip, resetGroupZoom, showGroupTooltip, syncZoomRange, useChartStream, useChartSync, useWebSocketStream };
|
|
@@ -143,6 +143,7 @@ var HexRow = memo(function HexRow({ offset, bytes, bytesPerRow, byteGrouping, of
|
|
|
143
143
|
style: {
|
|
144
144
|
padding: "0 2px",
|
|
145
145
|
marginLeft: needsGroupSpace ? 6 : 0,
|
|
146
|
+
flexShrink: 0,
|
|
146
147
|
background: bgColor,
|
|
147
148
|
color: isValid ? fgColor : `${tokens.colors.text.muted}26`,
|
|
148
149
|
cursor: isValid ? "pointer" : "default",
|
|
@@ -178,6 +179,7 @@ var HexRow = memo(function HexRow({ offset, bytes, bytesPerRow, byteGrouping, of
|
|
|
178
179
|
borderRadius: tokens.borderRadius.sm,
|
|
179
180
|
userSelect: "none",
|
|
180
181
|
width: 8,
|
|
182
|
+
flexShrink: 0,
|
|
181
183
|
textAlign: "center"
|
|
182
184
|
},
|
|
183
185
|
children: isValid ? byteToAscii(byte) : " "
|
|
@@ -188,7 +190,8 @@ var HexRow = memo(function HexRow({ offset, bytes, bytesPerRow, byteGrouping, of
|
|
|
188
190
|
display: "flex",
|
|
189
191
|
alignItems: "center",
|
|
190
192
|
height: HEX_ROW_HEIGHT,
|
|
191
|
-
lineHeight: `${HEX_ROW_HEIGHT}px
|
|
193
|
+
lineHeight: `${HEX_ROW_HEIGHT}px`,
|
|
194
|
+
width: "max-content"
|
|
192
195
|
},
|
|
193
196
|
children: [
|
|
194
197
|
showOffset && /* @__PURE__ */ jsx("span", {
|
|
@@ -196,6 +199,7 @@ var HexRow = memo(function HexRow({ offset, bytes, bytesPerRow, byteGrouping, of
|
|
|
196
199
|
color: tokens.colors.text.muted,
|
|
197
200
|
marginRight: 12,
|
|
198
201
|
minWidth: 60,
|
|
202
|
+
flexShrink: 0,
|
|
199
203
|
textAlign: "right"
|
|
200
204
|
},
|
|
201
205
|
children: formatOffset(offset, offsetBase, totalBytes)
|
|
@@ -205,6 +209,7 @@ var HexRow = memo(function HexRow({ offset, bytes, bytesPerRow, byteGrouping, of
|
|
|
205
209
|
display: "flex",
|
|
206
210
|
gap: 1,
|
|
207
211
|
marginRight: showAscii ? 16 : 0,
|
|
212
|
+
flexShrink: 0,
|
|
208
213
|
letterSpacing: "0.5px"
|
|
209
214
|
},
|
|
210
215
|
children: hexCells
|
|
@@ -212,12 +217,14 @@ var HexRow = memo(function HexRow({ offset, bytes, bytesPerRow, byteGrouping, of
|
|
|
212
217
|
showAscii && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
213
218
|
style: {
|
|
214
219
|
color: `${tokens.colors.border.muted}`,
|
|
215
|
-
marginRight: 8
|
|
220
|
+
marginRight: 8,
|
|
221
|
+
flexShrink: 0
|
|
216
222
|
},
|
|
217
223
|
children: "│"
|
|
218
224
|
}), /* @__PURE__ */ jsx("span", {
|
|
219
225
|
style: {
|
|
220
226
|
display: "flex",
|
|
227
|
+
flexShrink: 0,
|
|
221
228
|
letterSpacing: "1px"
|
|
222
229
|
},
|
|
223
230
|
children: asciiCells
|
|
@@ -296,6 +303,7 @@ function HexViewer({ data: rawData, bytesPerRow = 16, byteGrouping = 1, offsetBa
|
|
|
296
303
|
const [localEndianness, setLocalEndianness] = useState(endianness);
|
|
297
304
|
const [localShowAscii, setLocalShowAscii] = useState(showAscii);
|
|
298
305
|
const [scrollTop, setScrollTop] = useState(0);
|
|
306
|
+
const [scrollLeft, setScrollLeft] = useState(0);
|
|
299
307
|
const [viewportHeight, setViewportHeight] = useState(160);
|
|
300
308
|
useEffect(() => {
|
|
301
309
|
if (streaming && scrollRef.current) scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
@@ -393,6 +401,7 @@ function HexViewer({ data: rawData, bytesPerRow = 16, byteGrouping = 1, offsetBa
|
|
|
393
401
|
}, [localBytesPerRow]);
|
|
394
402
|
const handleHexScroll = useCallback((event) => {
|
|
395
403
|
setScrollTop(event.currentTarget.scrollTop);
|
|
404
|
+
setScrollLeft(event.currentTarget.scrollLeft);
|
|
396
405
|
}, []);
|
|
397
406
|
const nextSearchResult = useCallback(() => {
|
|
398
407
|
if (searchResults.length === 0) return;
|
|
@@ -1174,43 +1183,54 @@ function HexViewer({ data: rawData, bytesPerRow = 16, byteGrouping = 1, offsetBa
|
|
|
1174
1183
|
})]
|
|
1175
1184
|
}, i))
|
|
1176
1185
|
}),
|
|
1177
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ jsx("div", {
|
|
1178
1187
|
role: "row",
|
|
1179
1188
|
"aria-label": "Column headers",
|
|
1180
1189
|
style: {
|
|
1181
1190
|
padding: `${tokens.spacing.xs} ${tokens.spacing.smd}`,
|
|
1182
1191
|
borderBottom: `1px solid ${tokens.colors.border.muted}`,
|
|
1183
|
-
display: "flex",
|
|
1184
|
-
alignItems: "center",
|
|
1185
1192
|
fontSize: tokens.typography.fontSize.xxs,
|
|
1186
1193
|
color: tokens.colors.text.muted,
|
|
1187
1194
|
textTransform: "uppercase",
|
|
1188
1195
|
letterSpacing: "0.5px",
|
|
1189
1196
|
fontWeight: tokens.typography.fontWeight.medium,
|
|
1190
|
-
background: tokens.colors.background.surface
|
|
1197
|
+
background: tokens.colors.background.surface,
|
|
1198
|
+
overflow: "hidden"
|
|
1191
1199
|
},
|
|
1192
|
-
children:
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1200
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1201
|
+
style: {
|
|
1202
|
+
display: "flex",
|
|
1203
|
+
alignItems: "center",
|
|
1204
|
+
transform: `translateX(${-scrollLeft}px)`
|
|
1205
|
+
},
|
|
1206
|
+
children: [
|
|
1207
|
+
showOffset && /* @__PURE__ */ jsx("span", {
|
|
1208
|
+
style: {
|
|
1209
|
+
marginRight: tokens.spacing.smd,
|
|
1210
|
+
minWidth: 60,
|
|
1211
|
+
flexShrink: 0,
|
|
1212
|
+
textAlign: "right"
|
|
1213
|
+
},
|
|
1214
|
+
children: "Offset"
|
|
1215
|
+
}),
|
|
1216
|
+
/* @__PURE__ */ jsx("span", {
|
|
1217
|
+
style: { flex: 1 },
|
|
1218
|
+
children: "Hex"
|
|
1219
|
+
}),
|
|
1220
|
+
localShowAscii && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1221
|
+
"aria-hidden": "true",
|
|
1222
|
+
style: {
|
|
1223
|
+
color: `${tokens.colors.border.muted}`,
|
|
1224
|
+
marginRight: tokens.spacing.sm,
|
|
1225
|
+
flexShrink: 0
|
|
1226
|
+
},
|
|
1227
|
+
children: "|"
|
|
1228
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
1229
|
+
style: { flexShrink: 0 },
|
|
1230
|
+
children: "ASCII"
|
|
1231
|
+
})] })
|
|
1232
|
+
]
|
|
1233
|
+
})
|
|
1214
1234
|
}),
|
|
1215
1235
|
/* @__PURE__ */ jsx("div", {
|
|
1216
1236
|
ref: scrollRef,
|
|
@@ -1234,7 +1254,7 @@ function HexViewer({ data: rawData, bytesPerRow = 16, byteGrouping = 1, offsetBa
|
|
|
1234
1254
|
position: "absolute",
|
|
1235
1255
|
top: startRow * HEX_ROW_HEIGHT,
|
|
1236
1256
|
left: 0,
|
|
1237
|
-
|
|
1257
|
+
minWidth: "100%"
|
|
1238
1258
|
},
|
|
1239
1259
|
children: virtualRows.map((row) => /* @__PURE__ */ jsx(HexRow, {
|
|
1240
1260
|
offset: row.offset,
|