@cristiancosano/pallet-builder 0.1.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.
Files changed (93) hide show
  1. package/README.md +293 -0
  2. package/dist/App.d.ts +4 -0
  3. package/dist/components/controls/CameraControls/CameraControls.d.ts +16 -0
  4. package/dist/components/controls/CameraControls/index.d.ts +2 -0
  5. package/dist/components/controls/CameraTracker/CameraTracker.d.ts +8 -0
  6. package/dist/components/controls/CameraTracker/index.d.ts +2 -0
  7. package/dist/components/controls/MiniMap/MiniMap.d.ts +20 -0
  8. package/dist/components/controls/MiniMap/index.d.ts +2 -0
  9. package/dist/components/controls/ViewControls/ViewControls.d.ts +8 -0
  10. package/dist/components/controls/ViewControls/index.d.ts +2 -0
  11. package/dist/components/controls/index.d.ts +8 -0
  12. package/dist/components/environments/TruckEnvironment/TruckEnvironment.d.ts +11 -0
  13. package/dist/components/environments/TruckEnvironment/index.d.ts +2 -0
  14. package/dist/components/environments/WarehouseEnvironment/WarehouseEnvironment.d.ts +10 -0
  15. package/dist/components/environments/WarehouseEnvironment/index.d.ts +2 -0
  16. package/dist/components/environments/index.d.ts +4 -0
  17. package/dist/components/index.d.ts +4 -0
  18. package/dist/components/primitives/Box/Box.d.ts +14 -0
  19. package/dist/components/primitives/Box/index.d.ts +2 -0
  20. package/dist/components/primitives/Label/Label.d.ts +10 -0
  21. package/dist/components/primitives/Label/index.d.ts +2 -0
  22. package/dist/components/primitives/Pallet/Pallet.d.ts +9 -0
  23. package/dist/components/primitives/Pallet/index.d.ts +2 -0
  24. package/dist/components/primitives/Separator/Separator.d.ts +7 -0
  25. package/dist/components/primitives/Separator/index.d.ts +2 -0
  26. package/dist/components/primitives/StackedPallet/StackedPallet.d.ts +16 -0
  27. package/dist/components/primitives/StackedPallet/index.d.ts +2 -0
  28. package/dist/components/primitives/index.d.ts +10 -0
  29. package/dist/components/scenes/PalletScene/PalletScene.d.ts +21 -0
  30. package/dist/components/scenes/PalletScene/index.d.ts +2 -0
  31. package/dist/components/scenes/TruckScene/TruckScene.d.ts +24 -0
  32. package/dist/components/scenes/TruckScene/index.d.ts +2 -0
  33. package/dist/components/scenes/WarehouseScene/WarehouseScene.d.ts +20 -0
  34. package/dist/components/scenes/WarehouseScene/index.d.ts +2 -0
  35. package/dist/components/scenes/index.d.ts +6 -0
  36. package/dist/context/PresetContext.d.ts +8 -0
  37. package/dist/core/constants.d.ts +16 -0
  38. package/dist/core/entities/Box.d.ts +15 -0
  39. package/dist/core/entities/Pallet.d.ts +10 -0
  40. package/dist/core/entities/PalletFloor.d.ts +9 -0
  41. package/dist/core/entities/PlacedBox.d.ts +10 -0
  42. package/dist/core/entities/PlacedPallet.d.ts +8 -0
  43. package/dist/core/entities/Room.d.ts +10 -0
  44. package/dist/core/entities/Separator.d.ts +8 -0
  45. package/dist/core/entities/StackedPallet.d.ts +9 -0
  46. package/dist/core/entities/Truck.d.ts +12 -0
  47. package/dist/core/entities/Warehouse.d.ts +7 -0
  48. package/dist/core/entities/index.d.ts +11 -0
  49. package/dist/core/factories/BoxFactory.d.ts +7 -0
  50. package/dist/core/factories/PalletFactory.d.ts +23 -0
  51. package/dist/core/factories/TruckFactory.d.ts +7 -0
  52. package/dist/core/factories/index.d.ts +3 -0
  53. package/dist/core/index.d.ts +6 -0
  54. package/dist/core/packing/BinPacking3D.d.ts +8 -0
  55. package/dist/core/packing/ColumnStrategy.d.ts +8 -0
  56. package/dist/core/packing/PackingStrategy.d.ts +14 -0
  57. package/dist/core/packing/TypeGroupStrategy.d.ts +8 -0
  58. package/dist/core/packing/index.d.ts +5 -0
  59. package/dist/core/packing/registry.d.ts +11 -0
  60. package/dist/core/presets/ScenePreset.d.ts +56 -0
  61. package/dist/core/presets/index.d.ts +2 -0
  62. package/dist/core/types.d.ts +75 -0
  63. package/dist/core/validation/bounds.d.ts +9 -0
  64. package/dist/core/validation/collision.d.ts +8 -0
  65. package/dist/core/validation/gravity.d.ts +3 -0
  66. package/dist/core/validation/index.d.ts +7 -0
  67. package/dist/core/validation/polygon.d.ts +5 -0
  68. package/dist/core/validation/stability.d.ts +7 -0
  69. package/dist/core/validation/stacking.d.ts +9 -0
  70. package/dist/core/validation/weight.d.ts +9 -0
  71. package/dist/examples/index.d.ts +5 -0
  72. package/dist/examples/store/useExampleStore.d.ts +54 -0
  73. package/dist/examples/views/PalletBuilder.d.ts +1 -0
  74. package/dist/examples/views/TruckViewer.d.ts +1 -0
  75. package/dist/examples/views/WarehouseViewer.d.ts +1 -0
  76. package/dist/hooks/index.d.ts +10 -0
  77. package/dist/hooks/useCameraPosition.d.ts +6 -0
  78. package/dist/hooks/usePackingStrategy.d.ts +12 -0
  79. package/dist/hooks/usePalletMetrics.d.ts +9 -0
  80. package/dist/hooks/usePhysicsValidation.d.ts +16 -0
  81. package/dist/hooks/useWarehouseValidation.d.ts +9 -0
  82. package/dist/lib.d.ts +56 -0
  83. package/dist/main.d.ts +1 -0
  84. package/dist/objects/box.glb +0 -0
  85. package/dist/objects/pallet.glb +0 -0
  86. package/dist/pallet-builder.css +1 -0
  87. package/dist/pallet-builder.js +2611 -0
  88. package/dist/pallet-builder.js.map +1 -0
  89. package/dist/textures/crate_diffuse.png +0 -0
  90. package/dist/textures/pallet_planks.png +0 -0
  91. package/dist/vite.svg +1 -0
  92. package/dist/warehouse.hdr +0 -0
  93. package/package.json +70 -0
package/README.md ADDED
@@ -0,0 +1,293 @@
1
+ # 📦 @cristiancosano/pallet-builder
2
+
3
+ Sistema modular para visualización 3D de logística basado en React y React Three Fiber.
4
+
5
+ ## 🎯 Descripción
6
+
7
+ Librería de componentes React que permite construir escenas 3D interactivas para visualizar operaciones logísticas como almacenes, pallets, cajas y contenedores de transporte.
8
+
9
+ ## ✨ Características
10
+
11
+ - 🧱 **Sistema Modular**: Arquitectura limpia con separación entre lógica core y visualización
12
+ - 🎨 **Componentes Declarativos**: API simple basada en componentes React
13
+ - 📐 **Estándares Industriales**: Soporte para pallets EURO, ISO y personalizados
14
+ - 🔄 **Real-time**: Visualización 3D interactiva con controles de cámara
15
+ - 📊 **Validaciones**: Lógica de negocio para validar dimensiones, pesos y ocupación
16
+ - 🎯 **Agnóstico**: Core en TypeScript puro sin dependencias de frameworks de visualización
17
+
18
+ ## 🚀 Inicio Rápido
19
+
20
+ ### Instalación
21
+
22
+ ```bash
23
+ pnpm install
24
+ ```
25
+
26
+ ### Desarrollo
27
+
28
+ ```bash
29
+ pnpm dev
30
+ ```
31
+
32
+ Abre [http://localhost:5173](http://localhost:5173) para ver la demo.
33
+
34
+ ## 📖 Uso Básico
35
+
36
+ ```tsx
37
+ import { Warehouse, Pallet, Box } from '@cristiancosano/pallet-builder';
38
+
39
+ function MiAppLogistica() {
40
+ return (
41
+ <Warehouse width={5000} depth={5000} showGrid>
42
+
43
+ <Pallet id="pallet-A" position={[0, 0, 0]} type="EURO">
44
+ <Box
45
+ dimensions={[400, 300, 200]}
46
+ position={[0, 0, 0]}
47
+ color="orange"
48
+ label="Caja 1"
49
+ />
50
+ </Pallet>
51
+
52
+ <Pallet id="pallet-B" position={[1500, 0, 0]} type="ISO">
53
+ <Box
54
+ dimensions={[500, 400, 300]}
55
+ position={[0, 0, 0]}
56
+ color="blue"
57
+ />
58
+ </Pallet>
59
+
60
+ </Warehouse>
61
+ );
62
+ }
63
+ ```
64
+
65
+ ## 🏗️ Arquitectura
66
+
67
+ ### Core (TypeScript Puro)
68
+
69
+ Lógica de negocio agnóstica al framework de visualización:
70
+
71
+ ```typescript
72
+ import { BoxEntity, PalletEntity, ContainerEntity } from '@cristiancosano/pallet-builder';
73
+
74
+ // Crear un pallet con validaciones
75
+ const pallet = new PalletEntity({
76
+ id: 'pallet-1',
77
+ type: 'EURO',
78
+ position: [0, 0, 0],
79
+ boxes: [
80
+ {
81
+ id: 'box-1',
82
+ dimensions: [400, 300, 200], // mm
83
+ position: [0, 0, 0],
84
+ weight: 25, // kg
85
+ }
86
+ ]
87
+ });
88
+
89
+ // Validar configuración
90
+ const validation = pallet.validate();
91
+ console.log('Peso total:', pallet.getTotalWeight(), 'kg');
92
+ console.log('Ocupación:', pallet.getOccupancyRate(), '%');
93
+ ```
94
+
95
+ ### Componentes (React + R3F)
96
+
97
+ Componentes visuales 3D construidos con React Three Fiber:
98
+
99
+ - **`<Warehouse>`**: Contenedor principal de la escena 3D
100
+ - **`<Pallet>`**: Representa un pallet con soporte para EURO, ISO o custom
101
+ - **`<Box>`**: Caja/paquete posicionable dentro de un pallet
102
+ - **`<CameraControls>`**: Controles de cámara (órbita, primera persona, etc.)
103
+
104
+ ## 📐 Estándares de Pallets
105
+
106
+ ### EUR-Pallet (EURO)
107
+ - Dimensiones: 800 x 1200 x 144 mm
108
+ - Peso máximo: 1500 kg
109
+ - Altura máxima: 2200 mm
110
+
111
+ ### ISO Pallet (ISO)
112
+ - Dimensiones: 1000 x 1200 x 144 mm
113
+ - Peso máximo: 2000 kg
114
+ - Altura máxima: 2200 mm
115
+
116
+ ### Custom
117
+ - Dimensiones personalizables
118
+ - Configuración flexible
119
+
120
+ ## 🎨 Componentes Disponibles
121
+
122
+ ### Warehouse
123
+
124
+ Contenedor principal que crea la escena 3D con iluminación y controles.
125
+
126
+ ```tsx
127
+ <Warehouse
128
+ width={5000} // mm
129
+ depth={5000} // mm
130
+ height={3000} // mm (opcional)
131
+ showGrid={true} // Mostrar grid del suelo
132
+ backgroundColor="#f0f0f0"
133
+ >
134
+ {/* Contenido */}
135
+ </Warehouse>
136
+ ```
137
+
138
+ ### Pallet
139
+
140
+ Representa un pallet estándar o personalizado.
141
+
142
+ ```tsx
143
+ <Pallet
144
+ id="pallet-1"
145
+ type="EURO" // 'EURO' | 'ISO' | 'CUSTOM'
146
+ position={[0, 0, 0]} // [x, y, z] en mm
147
+ rotation={[0, 0, 0]} // [x, y, z] en radianes
148
+ color="#8B4513"
149
+ showDimensions={false}
150
+ customDimensions={[1000, 144, 1200]} // Para CUSTOM
151
+ >
152
+ {/* Cajas */}
153
+ </Pallet>
154
+ ```
155
+
156
+ ### Box
157
+
158
+ Caja o paquete dentro de un pallet.
159
+
160
+ ```tsx
161
+ <Box
162
+ dimensions={[400, 300, 200]} // [ancho, alto, fondo] en mm
163
+ position={[0, 0, 0]} // [x, y, z] dentro del pallet
164
+ color="#ff6b35"
165
+ label="Caja 1"
166
+ onClick={() => console.log('Click!')}
167
+ onHover={(hovered) => console.log(hovered)}
168
+ />
169
+ ```
170
+
171
+ ## 🎨 Personalización con AspectConfig
172
+
173
+ El sistema `AspectConfig` permite personalizar la apariencia visual de cada componente individualmente.
174
+
175
+ ### Configuración Global
176
+
177
+ Define valores por defecto para todos los componentes:
178
+
179
+ ```tsx
180
+ import { ConfigurationProvider, PalletBuilder, Box } from '@cristiancosano/pallet-builder';
181
+
182
+ function App() {
183
+ return (
184
+ <ConfigurationProvider
185
+ config={{
186
+ usePalletModel: true,
187
+ palletModelUrl: '/objects/pallet.glb',
188
+ palletTextureUrl: '/textures/pallet_planks.png',
189
+ useBoxModel: true,
190
+ boxModelUrl: '/objects/box.glb',
191
+ boxTextureUrl: '/textures/crate_roughness.png'
192
+ }}
193
+ >
194
+ <PalletBuilder palletType="EURO">
195
+ <Box dimensions={[400, 300, 200]} position={[0, 0, 0]} color="#ff6b35" />
196
+ </PalletBuilder>
197
+ </ConfigurationProvider>
198
+ );
199
+ }
200
+ ```
201
+
202
+ ### Personalización por Componente
203
+
204
+ Cada pallet o caja puede tener su propia textura, modelo o color:
205
+
206
+ ```tsx
207
+ <PalletBuilder
208
+ palletType="EURO"
209
+ palletAspect={{ textureUrl: '/textures/dark_wood.png' }}
210
+ >
211
+ {/* Caja con color personalizado */}
212
+ <Box
213
+ dimensions={[400, 300, 200]}
214
+ position={[0, 0, 0]}
215
+ aspect={{ color: '#00d9ff' }}
216
+ label="Caja Azul"
217
+ />
218
+
219
+ {/* Caja con textura personalizada */}
220
+ <Box
221
+ dimensions={[400, 300, 200]}
222
+ position={[400, 0, 0]}
223
+ aspect={{ textureUrl: '/textures/cardboard.png' }}
224
+ label="Caja Cartón"
225
+ />
226
+
227
+ {/* Caja con modelo 3D personalizado */}
228
+ <Box
229
+ dimensions={[400, 300, 200]}
230
+ position={[0, 0, 400]}
231
+ aspect={{
232
+ modelUrl: '/objects/custom_box.glb',
233
+ textureUrl: '/textures/metal.png'
234
+ }}
235
+ label="Caja Metal"
236
+ />
237
+ </PalletBuilder>
238
+ ```
239
+
240
+ ### Modelos 3D y Texturas por Defecto
241
+
242
+ La librería viene configurada con modelos y texturas por defecto:
243
+
244
+ **Pallets:**
245
+ - Modelo: `/objects/pallet.glb`
246
+ - Textura: `/textures/pallet_planks.png`
247
+
248
+ **Cajas:**
249
+ - Modelo: `/objects/box.glb`
250
+ - Textura: `/textures/crate_roughness.png`
251
+
252
+ Puedes usar tus propios modelos GLB y texturas personalizando la configuración global o usando el prop `aspect` en cada componente individual.
253
+
254
+ **Prioridad**: `aspect prop` > `ConfigurationProvider` > `defaults`
255
+
256
+ Ver [docs/guides/aspect-customization.md](./docs/guides/aspect-customization.md) para ejemplos completos.
257
+
258
+ ## 🔮 Roadmap
259
+
260
+ - [ ] **`<Truck>`**: Componente para visualizar camiones
261
+ - [ ] **`<Container>`**: Contenedor marítimo
262
+ - [ ] **Algoritmos de optimización**: Sugerencias automáticas de colocación
263
+ - [ ] **Exportación**: Generar reportes y visualizaciones
264
+ - [ ] **Física**: Simulación de peso y estabilidad
265
+ - [ ] **Multiplayer**: Colaboración en tiempo real
266
+
267
+ ## 📚 Documentación
268
+
269
+ Consulta la carpeta `/docs` para más información:
270
+
271
+ - [Guía de Componentes 3D](./docs/guides/3d-components-development.md)
272
+ - [Modelo de Dominio](./docs/context/domain-model.md)
273
+ - [Convenciones de Código](./docs/context/coding-conventions.md)
274
+
275
+ ## 🤝 Contribuir
276
+
277
+ Ver [CONTRIBUTING.md](./docs/guides/contributing.md)
278
+
279
+ ## � Atribuciones
280
+
281
+ Este proyecto utiliza assets de terceros:
282
+
283
+ - **HDR Environment Map**: [HDRI Haven/Poly Haven](https://polyhaven.com/) (CC0 License) via [pmndrs/drei-assets](https://github.com/pmndrs/drei-assets)
284
+
285
+ Ver [ATTRIBUTIONS.md](./ATTRIBUTIONS.md) para detalles completos.
286
+
287
+ ## �📄 Licencia
288
+
289
+ MIT © Cristian Cosano
290
+
291
+ ---
292
+
293
+ **Hecho con ❤️ usando React Three Fiber**
package/dist/App.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import './index.css';
2
+ import './examples/examples.css';
3
+ declare function App(): import("react/jsx-runtime").JSX.Element;
4
+ export default App;
@@ -0,0 +1,16 @@
1
+ export type CameraPreset = 'perspective' | 'top' | 'front' | 'side' | 'isometric';
2
+ export interface CameraControlsProps {
3
+ preset?: CameraPreset;
4
+ autoRotate?: boolean;
5
+ enablePan?: boolean;
6
+ enableZoom?: boolean;
7
+ target?: [number, number, number];
8
+ minDistance?: number;
9
+ maxDistance?: number;
10
+ sceneSize?: {
11
+ width: number;
12
+ height: number;
13
+ depth: number;
14
+ };
15
+ }
16
+ export declare const CameraControlsComponent: import("react").NamedExoticComponent<CameraControlsProps>;
@@ -0,0 +1,2 @@
1
+ export { CameraControlsComponent } from './CameraControls';
2
+ export type { CameraControlsProps, CameraPreset } from './CameraControls';
@@ -0,0 +1,8 @@
1
+ export interface CameraTrackerProps {
2
+ onPositionChange: (position: {
3
+ x: number;
4
+ y: number;
5
+ z: number;
6
+ }) => void;
7
+ }
8
+ export declare function CameraTracker({ onPositionChange }: CameraTrackerProps): null;
@@ -0,0 +1,2 @@
1
+ export { CameraTracker } from './CameraTracker';
2
+ export type { CameraTrackerProps } from './CameraTracker';
@@ -0,0 +1,20 @@
1
+ import './MiniMap.css';
2
+ export interface MiniMapProps {
3
+ sceneWidth: number;
4
+ sceneDepth: number;
5
+ sceneType: 'truck' | 'warehouse';
6
+ floorPolygon?: Array<{
7
+ x: number;
8
+ z: number;
9
+ }>;
10
+ cameraPosition?: {
11
+ x: number;
12
+ z: number;
13
+ };
14
+ targetPosition?: {
15
+ x: number;
16
+ z: number;
17
+ };
18
+ position?: 'bottom-left' | 'bottom-right';
19
+ }
20
+ export declare const MiniMap: import("react").NamedExoticComponent<MiniMapProps>;
@@ -0,0 +1,2 @@
1
+ export { MiniMap } from './MiniMap';
2
+ export type { MiniMapProps } from './MiniMap';
@@ -0,0 +1,8 @@
1
+ import type { CameraPreset } from '../CameraControls';
2
+ import './ViewControls.css';
3
+ export interface ViewControlsProps {
4
+ currentPreset: CameraPreset;
5
+ onPresetChange: (preset: CameraPreset) => void;
6
+ position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
7
+ }
8
+ export declare const ViewControls: import("react").NamedExoticComponent<ViewControlsProps>;
@@ -0,0 +1,2 @@
1
+ export { ViewControls } from './ViewControls';
2
+ export type { ViewControlsProps } from './ViewControls';
@@ -0,0 +1,8 @@
1
+ export { CameraControlsComponent } from './CameraControls';
2
+ export type { CameraControlsProps, CameraPreset } from './CameraControls';
3
+ export { ViewControls } from './ViewControls';
4
+ export type { ViewControlsProps } from './ViewControls';
5
+ export { MiniMap } from './MiniMap';
6
+ export type { MiniMapProps } from './MiniMap';
7
+ export { CameraTracker } from './CameraTracker';
8
+ export type { CameraTrackerProps } from './CameraTracker';
@@ -0,0 +1,11 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { Truck } from '@/core/entities/Truck';
3
+ export interface TruckEnvironmentProps {
4
+ truck: Truck;
5
+ showGrid?: boolean;
6
+ wallOpacity?: number;
7
+ showRoof?: boolean;
8
+ showSideWalls?: boolean;
9
+ children?: ReactNode;
10
+ }
11
+ export declare const TruckEnvironment: import("react").NamedExoticComponent<TruckEnvironmentProps>;
@@ -0,0 +1,2 @@
1
+ export { TruckEnvironment } from './TruckEnvironment';
2
+ export type { TruckEnvironmentProps } from './TruckEnvironment';
@@ -0,0 +1,10 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { Room } from '@/core/entities/Room';
3
+ export interface WarehouseEnvironmentProps {
4
+ room: Room;
5
+ floorColor?: string;
6
+ wallColor?: string;
7
+ showGrid?: boolean;
8
+ children?: ReactNode;
9
+ }
10
+ export declare const WarehouseEnvironment: import("react").NamedExoticComponent<WarehouseEnvironmentProps>;
@@ -0,0 +1,2 @@
1
+ export { WarehouseEnvironment } from './WarehouseEnvironment';
2
+ export type { WarehouseEnvironmentProps } from './WarehouseEnvironment';
@@ -0,0 +1,4 @@
1
+ export { WarehouseEnvironment } from './WarehouseEnvironment';
2
+ export type { WarehouseEnvironmentProps } from './WarehouseEnvironment';
3
+ export { TruckEnvironment } from './TruckEnvironment';
4
+ export type { TruckEnvironmentProps } from './TruckEnvironment';
@@ -0,0 +1,4 @@
1
+ export * from './primitives';
2
+ export * from './environments';
3
+ export * from './controls';
4
+ export * from './scenes';
@@ -0,0 +1,14 @@
1
+ import type { PlacedBox } from '@/core/entities/PlacedBox';
2
+ export interface BoxProps {
3
+ placedBox: PlacedBox;
4
+ selected?: boolean;
5
+ highlighted?: boolean;
6
+ showLabel?: boolean;
7
+ color?: string;
8
+ opacity?: number;
9
+ selectedColor?: string;
10
+ highlightedColor?: string;
11
+ onClick?: (id: string) => void;
12
+ onHover?: (id: string | null) => void;
13
+ }
14
+ export declare const BoxComponent: import("react").NamedExoticComponent<BoxProps>;
@@ -0,0 +1,2 @@
1
+ export { BoxComponent } from './Box';
2
+ export type { BoxProps } from './Box';
@@ -0,0 +1,10 @@
1
+ import type { Position3D } from '@/core/types';
2
+ export interface LabelProps {
3
+ text: string;
4
+ position: Position3D;
5
+ visible?: boolean;
6
+ fontSize?: number;
7
+ color?: string;
8
+ background?: string;
9
+ }
10
+ export declare const Label: import("react").NamedExoticComponent<LabelProps>;
@@ -0,0 +1,2 @@
1
+ export { Label } from './Label';
2
+ export type { LabelProps } from './Label';
@@ -0,0 +1,9 @@
1
+ import type { Pallet } from '@/core/entities/Pallet';
2
+ import type { Position3D } from '@/core/types';
3
+ export interface PalletComponentProps {
4
+ pallet: Pallet;
5
+ position?: Position3D;
6
+ color?: string;
7
+ edgeColor?: string;
8
+ }
9
+ export declare const PalletComponent: import("react").NamedExoticComponent<PalletComponentProps>;
@@ -0,0 +1,2 @@
1
+ export { PalletComponent } from './Pallet';
2
+ export type { PalletComponentProps } from './Pallet';
@@ -0,0 +1,7 @@
1
+ import type { Separator } from '@/core/entities/Separator';
2
+ import type { Position3D } from '@/core/types';
3
+ export interface SeparatorComponentProps {
4
+ separator: Separator;
5
+ position?: Position3D;
6
+ }
7
+ export declare const SeparatorComponent: import("react").NamedExoticComponent<SeparatorComponentProps>;
@@ -0,0 +1,2 @@
1
+ export { SeparatorComponent } from './Separator';
2
+ export type { SeparatorComponentProps } from './Separator';
@@ -0,0 +1,16 @@
1
+ import type { StackedPallet } from '@/core/entities/StackedPallet';
2
+ import type { Position3D } from '@/core/types';
3
+ export interface StackedPalletComponentProps {
4
+ stackedPallet: StackedPallet;
5
+ position?: Position3D;
6
+ yRotation?: 0 | 90 | 180 | 270;
7
+ palletId?: string;
8
+ selectedBoxId?: string | null;
9
+ highlightedBoxId?: string | null;
10
+ selectedColor?: string;
11
+ highlightedColor?: string;
12
+ showLabels?: boolean;
13
+ onBoxClick?: (id: string) => void;
14
+ onBoxHover?: (id: string | null) => void;
15
+ }
16
+ export declare const StackedPalletComponent: import("react").NamedExoticComponent<StackedPalletComponentProps>;
@@ -0,0 +1,2 @@
1
+ export { StackedPalletComponent } from './StackedPallet';
2
+ export type { StackedPalletComponentProps } from './StackedPallet';
@@ -0,0 +1,10 @@
1
+ export { BoxComponent } from './Box';
2
+ export type { BoxProps } from './Box';
3
+ export { PalletComponent } from './Pallet';
4
+ export type { PalletComponentProps } from './Pallet';
5
+ export { SeparatorComponent } from './Separator';
6
+ export type { SeparatorComponentProps } from './Separator';
7
+ export { StackedPalletComponent } from './StackedPallet';
8
+ export type { StackedPalletComponentProps } from './StackedPallet';
9
+ export { Label } from './Label';
10
+ export type { LabelProps } from './Label';
@@ -0,0 +1,21 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { StackedPallet } from '@/core/entities/StackedPallet';
3
+ import type { CameraPreset } from '@/components/controls/CameraControls';
4
+ import type { ScenePreset } from '@/core/presets';
5
+ export interface PalletSceneProps {
6
+ stackedPallet: StackedPallet;
7
+ preset?: string | ScenePreset;
8
+ selectedBoxId?: string | null;
9
+ highlightedBoxId?: string | null;
10
+ selectedColor?: string;
11
+ highlightedColor?: string;
12
+ showLabels?: boolean;
13
+ cameraPreset?: CameraPreset;
14
+ showGrid?: boolean;
15
+ showMiniMap?: boolean;
16
+ onBoxClick?: (id: string) => void;
17
+ onBoxHover?: (id: string | null) => void;
18
+ children?: ReactNode;
19
+ style?: React.CSSProperties;
20
+ }
21
+ export declare const PalletScene: import("react").NamedExoticComponent<PalletSceneProps>;
@@ -0,0 +1,2 @@
1
+ export { PalletScene } from './PalletScene';
2
+ export type { PalletSceneProps } from './PalletScene';
@@ -0,0 +1,24 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { Truck } from '@/core/entities/Truck';
3
+ import type { CameraPreset } from '@/components/controls/CameraControls';
4
+ import type { ScenePreset } from '@/core/presets';
5
+ export interface TruckSceneProps {
6
+ truck: Truck;
7
+ preset?: string | ScenePreset;
8
+ selectedBoxId?: string | null;
9
+ highlightedBoxId?: string | null;
10
+ selectedColor?: string;
11
+ highlightedColor?: string;
12
+ showLabels?: boolean;
13
+ showGrid?: boolean;
14
+ wallOpacity?: number;
15
+ showRoof?: boolean;
16
+ showSideWalls?: boolean;
17
+ cameraPreset?: CameraPreset;
18
+ showMiniMap?: boolean;
19
+ onBoxClick?: (id: string) => void;
20
+ onBoxHover?: (id: string | null) => void;
21
+ children?: ReactNode;
22
+ style?: React.CSSProperties;
23
+ }
24
+ export declare const TruckScene: import("react").NamedExoticComponent<TruckSceneProps>;
@@ -0,0 +1,2 @@
1
+ export { TruckScene } from './TruckScene';
2
+ export type { TruckSceneProps } from './TruckScene';
@@ -0,0 +1,20 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { Room } from '@/core/entities/Room';
3
+ import type { CameraPreset } from '@/components/controls/CameraControls';
4
+ import type { ScenePreset } from '@/core/presets';
5
+ export interface WarehouseSceneProps {
6
+ room: Room;
7
+ preset?: string | ScenePreset;
8
+ selectedBoxId?: string | null;
9
+ highlightedBoxId?: string | null;
10
+ selectedColor?: string;
11
+ highlightedColor?: string;
12
+ showLabels?: boolean;
13
+ cameraPreset?: CameraPreset;
14
+ showMiniMap?: boolean;
15
+ onBoxClick?: (id: string) => void;
16
+ onBoxHover?: (id: string | null) => void;
17
+ children?: ReactNode;
18
+ style?: React.CSSProperties;
19
+ }
20
+ export declare const WarehouseScene: import("react").NamedExoticComponent<WarehouseSceneProps>;
@@ -0,0 +1,2 @@
1
+ export { WarehouseScene } from './WarehouseScene';
2
+ export type { WarehouseSceneProps } from './WarehouseScene';
@@ -0,0 +1,6 @@
1
+ export { PalletScene } from './PalletScene';
2
+ export type { PalletSceneProps } from './PalletScene';
3
+ export { TruckScene } from './TruckScene';
4
+ export type { TruckSceneProps } from './TruckScene';
5
+ export { WarehouseScene } from './WarehouseScene';
6
+ export type { WarehouseSceneProps } from './WarehouseScene';
@@ -0,0 +1,8 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { ScenePreset } from '@/core/presets';
3
+ export interface PresetProviderProps {
4
+ preset?: string | ScenePreset;
5
+ children: ReactNode;
6
+ }
7
+ export declare function PresetProvider({ preset, children }: PresetProviderProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function usePreset(): ScenePreset;
@@ -0,0 +1,16 @@
1
+ import { TruckType } from './types';
2
+ import type { PalletPreset, TruckPreset } from './types';
3
+ export declare const STANDARD_PALLETS: Record<string, PalletPreset>;
4
+ export declare const AMERICAN_PALLET: PalletPreset;
5
+ export declare const TRUCK_PRESETS: Record<Exclude<TruckType, 'CUSTOM'>, TruckPreset>;
6
+ export declare const SEPARATOR_DEFAULTS: {
7
+ readonly thickness: 10;
8
+ readonly weight: 2;
9
+ };
10
+ export declare const UNITS: {
11
+ readonly MM_TO_M: 0.001;
12
+ readonly M_TO_MM: 1000;
13
+ };
14
+ export declare const COLLISION_TOLERANCE = 1;
15
+ export declare const MIN_SUPPORT_PERCENTAGE = 0.6;
16
+ export declare const WEIGHT_WARNING_THRESHOLD = 0.9;
@@ -0,0 +1,15 @@
1
+ import type { Dimensions3D } from '../types';
2
+ export interface Box {
3
+ id: string;
4
+ dimensions: Dimensions3D;
5
+ weight: number;
6
+ sku?: string;
7
+ type?: string;
8
+ fragile: boolean;
9
+ fragilityMaxWeight?: number;
10
+ stackable: boolean;
11
+ color?: string;
12
+ texture?: string;
13
+ modelUrl?: string;
14
+ metadata: Record<string, unknown>;
15
+ }