@j3m-quantum/ui 2.1.8 → 2.1.9

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/README.md CHANGED
@@ -408,11 +408,14 @@ const navItems: NavItem[] = [
408
408
 
409
409
  ## Map Components
410
410
 
411
- Leaflet-based map components for displaying interactive maps. **Requires optional peer dependencies.**
411
+ Leaflet-based map components for displaying interactive maps. **Separate entry point - requires additional dependencies.**
412
+
413
+ > **Note:** Map components are in a separate entry point (`@j3m-quantum/ui/map`) to avoid requiring leaflet for users who don't need maps.
412
414
 
413
415
  ### Installation
414
416
 
415
417
  ```bash
418
+ # Install map dependencies
416
419
  npm install leaflet react-leaflet
417
420
  ```
418
421
 
@@ -425,13 +428,14 @@ Import Leaflet CSS in your app's entry CSS file:
425
428
  @import "tailwindcss";
426
429
  @import "tw-animate-css";
427
430
  @import "@j3m-quantum/ui/styles";
428
- @import "leaflet/dist/leaflet.css";
431
+ @import "leaflet/dist/leaflet.css"; /* Required for maps */
429
432
  ```
430
433
 
431
434
  ### Basic Usage
432
435
 
433
436
  ```tsx
434
- import { Map, MapTileLayer, MapMarker, MapPopup } from '@j3m-quantum/ui'
437
+ // Import from the /map entry point
438
+ import { Map, MapTileLayer, MapMarker, MapPopup } from '@j3m-quantum/ui/map'
435
439
 
436
440
  function MyMap() {
437
441
  return (
package/dist/cli/index.js CHANGED
@@ -535,14 +535,14 @@ var REGISTRY = {
535
535
  ]
536
536
  },
537
537
  map: {
538
- label: "Map (requires leaflet)",
538
+ label: "Map (separate import: @j3m-quantum/ui/map)",
539
539
  components: [
540
- { name: "Map", description: "Map container", import: "Map" },
541
- { name: "MapTileLayer", description: "Map tile layer", import: "MapTileLayer" },
542
- { name: "MapMarker", description: "Map marker", import: "MapMarker" },
543
- { name: "MapPopup", description: "Marker popup", import: "MapPopup" },
544
- { name: "MapTooltip", description: "Marker tooltip", import: "MapTooltip" },
545
- { name: "MapZoomControl", description: "Zoom controls", import: "MapZoomControl" }
540
+ { name: "Map", description: "Map container", import: "Map from '@j3m-quantum/ui/map'" },
541
+ { name: "MapTileLayer", description: "Map tile layer", import: "MapTileLayer from '@j3m-quantum/ui/map'" },
542
+ { name: "MapMarker", description: "Map marker", import: "MapMarker from '@j3m-quantum/ui/map'" },
543
+ { name: "MapPopup", description: "Marker popup", import: "MapPopup from '@j3m-quantum/ui/map'" },
544
+ { name: "MapTooltip", description: "Marker tooltip", import: "MapTooltip from '@j3m-quantum/ui/map'" },
545
+ { name: "MapZoomControl", description: "Zoom controls", import: "MapZoomControl from '@j3m-quantum/ui/map'" }
546
546
  ]
547
547
  }
548
548
  };
package/dist/index.cjs CHANGED
@@ -40,7 +40,6 @@ var PopoverPrimitive = require('@radix-ui/react-popover');
40
40
  var HoverCardPrimitive = require('@radix-ui/react-hover-card');
41
41
  var CollapsiblePrimitive = require('@radix-ui/react-collapsible');
42
42
  var ResizablePrimitive = require('react-resizable-panels');
43
- var reactLeaflet = require('react-leaflet');
44
43
  var reactTable = require('@tanstack/react-table');
45
44
  var dateFns = require('date-fns');
46
45
  var core = require('@dnd-kit/core');
@@ -6381,89 +6380,6 @@ var SectionFooter = React30__namespace.forwardRef(
6381
6380
  )
6382
6381
  );
6383
6382
  SectionFooter.displayName = "SectionFooter";
6384
- function Map2({
6385
- center,
6386
- zoom = 13,
6387
- className,
6388
- children,
6389
- ...props
6390
- }) {
6391
- return /* @__PURE__ */ jsxRuntime.jsx(
6392
- reactLeaflet.MapContainer,
6393
- {
6394
- center,
6395
- zoom,
6396
- className: cn(
6397
- "w-full rounded-lg border border-border overflow-hidden",
6398
- "[&_.leaflet-control-zoom]:border-border",
6399
- "[&_.leaflet-control-zoom]:rounded-md",
6400
- "[&_.leaflet-control-zoom]:shadow-sm",
6401
- "[&_.leaflet-control-zoom-in]:rounded-t-md",
6402
- "[&_.leaflet-control-zoom-in]:border-b",
6403
- "[&_.leaflet-control-zoom-in]:border-border",
6404
- "[&_.leaflet-control-zoom-out]:rounded-b-md",
6405
- "[&_.leaflet-popup-content-wrapper]:rounded-lg",
6406
- "[&_.leaflet-popup-content-wrapper]:shadow-lg",
6407
- "[&_.leaflet-popup-content-wrapper]:border",
6408
- "[&_.leaflet-popup-content-wrapper]:border-border",
6409
- className
6410
- ),
6411
- scrollWheelZoom: true,
6412
- ...props,
6413
- children
6414
- }
6415
- );
6416
- }
6417
- var TILE_LAYERS = {
6418
- default: {
6419
- url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
6420
- attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
6421
- },
6422
- dark: {
6423
- url: "https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png",
6424
- attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a>'
6425
- },
6426
- satellite: {
6427
- url: "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
6428
- attribution: "&copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"
6429
- }
6430
- };
6431
- function MapTileLayer({
6432
- variant = "default",
6433
- ...props
6434
- }) {
6435
- const layer = TILE_LAYERS[variant];
6436
- return /* @__PURE__ */ jsxRuntime.jsx(
6437
- reactLeaflet.TileLayer,
6438
- {
6439
- url: layer.url,
6440
- attribution: layer.attribution,
6441
- ...props
6442
- }
6443
- );
6444
- }
6445
- function MapMarker({
6446
- position,
6447
- children,
6448
- ...props
6449
- }) {
6450
- return /* @__PURE__ */ jsxRuntime.jsx(reactLeaflet.Marker, { position, ...props, children });
6451
- }
6452
- function MapPopup({
6453
- children,
6454
- ...props
6455
- }) {
6456
- return /* @__PURE__ */ jsxRuntime.jsx(reactLeaflet.Popup, { ...props, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm", children }) });
6457
- }
6458
- function MapTooltip({
6459
- children,
6460
- ...props
6461
- }) {
6462
- return /* @__PURE__ */ jsxRuntime.jsx(reactLeaflet.Tooltip, { ...props, children });
6463
- }
6464
- function MapZoomControl(props) {
6465
- return /* @__PURE__ */ jsxRuntime.jsx(reactLeaflet.ZoomControl, { ...props });
6466
- }
6467
6383
  function DataTableColumnHeader({
6468
6384
  column,
6469
6385
  title,
@@ -19368,12 +19284,6 @@ exports.KanbanProvider = KanbanProvider;
19368
19284
  exports.Kbd = Kbd;
19369
19285
  exports.KbdGroup = KbdGroup;
19370
19286
  exports.Label = Label2;
19371
- exports.Map = Map2;
19372
- exports.MapMarker = MapMarker;
19373
- exports.MapPopup = MapPopup;
19374
- exports.MapTileLayer = MapTileLayer;
19375
- exports.MapTooltip = MapTooltip;
19376
- exports.MapZoomControl = MapZoomControl;
19377
19287
  exports.Menubar = Menubar;
19378
19288
  exports.MenubarCheckboxItem = MenubarCheckboxItem;
19379
19289
  exports.MenubarContent = MenubarContent;