@ifc-lite/viewer 1.1.7 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +373 -0
- package/dist/apple-touch-icon.png +0 -0
- package/dist/assets/Arrow.dom-BjDQoB2M.js +20 -0
- package/dist/assets/arrow2-bb-jcVEo.js +2 -0
- package/dist/assets/arrow2_bg-4Y7xYo54.wasm +0 -0
- package/dist/assets/arrow2_bg-BlXl-cSQ.js +1 -0
- package/dist/assets/arrow2_bg-BoXCojjR.wasm +0 -0
- package/dist/assets/desktop-cache-oPzaWXYE.js +1 -0
- package/dist/assets/event-DIOks52T.js +1 -0
- package/dist/assets/ifc-cache-BAN4vcd4.js +1 -0
- package/dist/assets/ifc-lite_bg-C6kblxf9.wasm +0 -0
- package/dist/assets/index-YBtrHPu3.js +65252 -0
- package/dist/assets/index-v3mcCUPN.css +1 -0
- package/dist/assets/native-bridge-CULtTDX3.js +111 -0
- package/dist/assets/wasm-bridge-CjL-lSak.js +1 -0
- package/dist/favicon-16x16-cropped.png +0 -0
- package/dist/favicon-16x16.png +0 -0
- package/dist/favicon-192x192-cropped.png +0 -0
- package/dist/favicon-192x192.png +0 -0
- package/dist/favicon-32x32-cropped.png +0 -0
- package/dist/favicon-32x32.png +0 -0
- package/dist/favicon-48x48-cropped.png +0 -0
- package/dist/favicon-48x48.png +0 -0
- package/dist/favicon-512x512-cropped.png +0 -0
- package/dist/favicon-512x512.png +0 -0
- package/dist/favicon-64x64-cropped.png +0 -0
- package/dist/favicon-64x64.png +0 -0
- package/dist/favicon-96x96-cropped.png +0 -0
- package/dist/favicon-96x96.png +0 -0
- package/dist/favicon-square-512.png +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/favicon.png +0 -0
- package/dist/favicon.svg +3 -0
- package/dist/index.html +44 -0
- package/dist/logo.png +0 -0
- package/dist/manifest.json +48 -0
- package/index.html +33 -2
- package/package.json +34 -17
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16-cropped.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-192x192-cropped.png +0 -0
- package/public/favicon-192x192.png +0 -0
- package/public/favicon-32x32-cropped.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon-48x48-cropped.png +0 -0
- package/public/favicon-48x48.png +0 -0
- package/public/favicon-512x512-cropped.png +0 -0
- package/public/favicon-512x512.png +0 -0
- package/public/favicon-64x64-cropped.png +0 -0
- package/public/favicon-64x64.png +0 -0
- package/public/favicon-96x96-cropped.png +0 -0
- package/public/favicon-96x96.png +0 -0
- package/public/favicon-square-512.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/favicon.png +0 -0
- package/public/favicon.svg +3 -0
- package/public/logo.png +0 -0
- package/public/manifest.json +48 -0
- package/src/App.tsx +2 -0
- package/src/components/ui/alert.tsx +62 -0
- package/src/components/ui/badge.tsx +39 -0
- package/src/components/ui/dialog.tsx +120 -0
- package/src/components/ui/label.tsx +27 -0
- package/src/components/ui/select.tsx +151 -0
- package/src/components/ui/switch.tsx +30 -0
- package/src/components/ui/table.tsx +120 -0
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/viewer/BCFPanel.tsx +1164 -0
- package/src/components/viewer/BulkPropertyEditor.tsx +875 -0
- package/src/components/viewer/DataConnector.tsx +840 -0
- package/src/components/viewer/DrawingSettingsPanel.tsx +536 -0
- package/src/components/viewer/EntityContextMenu.tsx +45 -17
- package/src/components/viewer/ExportChangesButton.tsx +195 -0
- package/src/components/viewer/ExportDialog.tsx +402 -0
- package/src/components/viewer/HierarchyPanel.tsx +1132 -218
- package/src/components/viewer/IDSPanel.tsx +661 -0
- package/src/components/viewer/KeyboardShortcutsDialog.tsx +245 -39
- package/src/components/viewer/MainToolbar.tsx +418 -94
- package/src/components/viewer/PropertiesPanel.tsx +1355 -91
- package/src/components/viewer/PropertyEditor.tsx +611 -0
- package/src/components/viewer/Section2DPanel.tsx +3313 -0
- package/src/components/viewer/SheetSetupPanel.tsx +502 -0
- package/src/components/viewer/StatusBar.tsx +27 -16
- package/src/components/viewer/TitleBlockEditor.tsx +437 -0
- package/src/components/viewer/ToolOverlays.tsx +935 -127
- package/src/components/viewer/ViewerLayout.tsx +40 -11
- package/src/components/viewer/Viewport.tsx +1276 -336
- package/src/components/viewer/ViewportContainer.tsx +554 -18
- package/src/components/viewer/ViewportOverlays.tsx +24 -7
- package/src/hooks/useBCF.ts +504 -0
- package/src/hooks/useIDS.ts +1065 -0
- package/src/hooks/useIfc.ts +1534 -205
- package/src/hooks/useIfcCache.ts +279 -0
- package/src/hooks/useKeyboardShortcuts.ts +50 -8
- package/src/hooks/useModelSelection.ts +61 -0
- package/src/hooks/useViewerSelectors.ts +218 -0
- package/src/hooks/useWebGPU.ts +80 -0
- package/src/index.css +265 -27
- package/src/lib/platform.ts +23 -0
- package/src/services/cacheService.ts +142 -0
- package/src/services/desktop-cache.ts +143 -0
- package/src/services/fs-cache.ts +212 -0
- package/src/services/ifc-cache.ts +14 -6
- package/src/store/constants.ts +85 -0
- package/src/store/index.ts +214 -0
- package/src/store/slices/bcfSlice.ts +372 -0
- package/src/store/slices/cameraSlice.ts +63 -0
- package/src/store/slices/dataSlice.test.ts +226 -0
- package/src/store/slices/dataSlice.ts +112 -0
- package/src/store/slices/drawing2DSlice.ts +340 -0
- package/src/store/slices/hoverSlice.ts +40 -0
- package/src/store/slices/idsSlice.ts +310 -0
- package/src/store/slices/loadingSlice.ts +33 -0
- package/src/store/slices/measurementSlice.test.ts +217 -0
- package/src/store/slices/measurementSlice.ts +293 -0
- package/src/store/slices/modelSlice.test.ts +271 -0
- package/src/store/slices/modelSlice.ts +211 -0
- package/src/store/slices/mutationSlice.ts +502 -0
- package/src/store/slices/sectionSlice.test.ts +125 -0
- package/src/store/slices/sectionSlice.ts +58 -0
- package/src/store/slices/selectionSlice.test.ts +286 -0
- package/src/store/slices/selectionSlice.ts +263 -0
- package/src/store/slices/sheetSlice.ts +565 -0
- package/src/store/slices/uiSlice.ts +58 -0
- package/src/store/slices/visibilitySlice.test.ts +304 -0
- package/src/store/slices/visibilitySlice.ts +277 -0
- package/src/store/types.test.ts +135 -0
- package/src/store/types.ts +248 -0
- package/src/store.ts +40 -515
- package/src/utils/ifcConfig.ts +82 -0
- package/src/utils/localParsingUtils.ts +287 -0
- package/src/utils/serverDataModel.ts +783 -0
- package/src/utils/spatialHierarchy.ts +283 -0
- package/src/utils/viewportUtils.ts +334 -0
- package/src/vite-env.d.ts +23 -0
- package/src/webgpu-types.d.ts +128 -0
- package/src-tauri/Cargo.toml +29 -0
- package/src-tauri/build.rs +7 -0
- package/src-tauri/capabilities/default.json +18 -0
- package/src-tauri/icons/128x128.png +0 -0
- package/src-tauri/icons/128x128@2x.png +0 -0
- package/src-tauri/icons/32x32.png +0 -0
- package/src-tauri/icons/Square107x107Logo.png +0 -0
- package/src-tauri/icons/Square142x142Logo.png +0 -0
- package/src-tauri/icons/Square150x150Logo.png +0 -0
- package/src-tauri/icons/Square284x284Logo.png +0 -0
- package/src-tauri/icons/Square30x30Logo.png +0 -0
- package/src-tauri/icons/Square310x310Logo.png +0 -0
- package/src-tauri/icons/Square44x44Logo.png +0 -0
- package/src-tauri/icons/Square71x71Logo.png +0 -0
- package/src-tauri/icons/Square89x89Logo.png +0 -0
- package/src-tauri/icons/StoreLogo.png +0 -0
- package/src-tauri/icons/icon.icns +0 -0
- package/src-tauri/icons/icon.ico +0 -0
- package/src-tauri/icons/icon.png +0 -0
- package/src-tauri/src/lib.rs +21 -0
- package/src-tauri/src/main.rs +10 -0
- package/src-tauri/tauri.conf.json +39 -0
- package/vite.config.ts +174 -26
- package/public/ifc-lite_bg.wasm +0 -0
- package/public/web-ifc.wasm +0 -0
- package/src/components/Viewport.tsx +0 -723
- package/src/components/viewer/BoxSelectionOverlay.tsx +0 -53
|
@@ -15,7 +15,8 @@ import { useKeyboardShortcuts } from '@/hooks/useKeyboardShortcuts';
|
|
|
15
15
|
import { useViewerStore } from '@/store';
|
|
16
16
|
import { EntityContextMenu } from './EntityContextMenu';
|
|
17
17
|
import { HoverTooltip } from './HoverTooltip';
|
|
18
|
-
import {
|
|
18
|
+
import { BCFPanel } from './BCFPanel';
|
|
19
|
+
import { IDSPanel } from './IDSPanel';
|
|
19
20
|
|
|
20
21
|
export function ViewerLayout() {
|
|
21
22
|
// Initialize keyboard shortcuts
|
|
@@ -30,6 +31,10 @@ export function ViewerLayout() {
|
|
|
30
31
|
const rightPanelCollapsed = useViewerStore((s) => s.rightPanelCollapsed);
|
|
31
32
|
const setLeftPanelCollapsed = useViewerStore((s) => s.setLeftPanelCollapsed);
|
|
32
33
|
const setRightPanelCollapsed = useViewerStore((s) => s.setRightPanelCollapsed);
|
|
34
|
+
const bcfPanelVisible = useViewerStore((s) => s.bcfPanelVisible);
|
|
35
|
+
const setBcfPanelVisible = useViewerStore((s) => s.setBcfPanelVisible);
|
|
36
|
+
const idsPanelVisible = useViewerStore((s) => s.idsPanelVisible);
|
|
37
|
+
const setIdsPanelVisible = useViewerStore((s) => s.setIdsPanelVisible);
|
|
33
38
|
|
|
34
39
|
// Detect mobile viewport
|
|
35
40
|
useEffect(() => {
|
|
@@ -48,10 +53,17 @@ export function ViewerLayout() {
|
|
|
48
53
|
return () => window.removeEventListener('resize', checkMobile);
|
|
49
54
|
}, [setIsMobile, setLeftPanelCollapsed, setRightPanelCollapsed]);
|
|
50
55
|
|
|
56
|
+
// Initialize theme on mount and sync with store
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
const currentTheme = useViewerStore.getState().theme;
|
|
59
|
+
document.documentElement.classList.toggle('dark', currentTheme === 'dark');
|
|
60
|
+
}, []);
|
|
61
|
+
|
|
51
62
|
useEffect(() => {
|
|
52
63
|
document.documentElement.classList.toggle('dark', theme === 'dark');
|
|
53
64
|
}, [theme]);
|
|
54
65
|
|
|
66
|
+
|
|
55
67
|
return (
|
|
56
68
|
<TooltipProvider delayDuration={300}>
|
|
57
69
|
<div className="flex flex-col h-screen w-screen overflow-hidden bg-background text-foreground">
|
|
@@ -61,7 +73,6 @@ export function ViewerLayout() {
|
|
|
61
73
|
{/* Global Overlays */}
|
|
62
74
|
<EntityContextMenu />
|
|
63
75
|
<HoverTooltip />
|
|
64
|
-
<BoxSelectionOverlay />
|
|
65
76
|
|
|
66
77
|
{/* Main Toolbar */}
|
|
67
78
|
<MainToolbar onShowShortcuts={shortcutsDialog.toggle} />
|
|
@@ -85,7 +96,7 @@ export function ViewerLayout() {
|
|
|
85
96
|
<PanelResizeHandle className="w-1.5 bg-border hover:bg-primary/50 active:bg-primary/70 transition-colors cursor-col-resize" />
|
|
86
97
|
|
|
87
98
|
{/* Center - Viewport */}
|
|
88
|
-
<Panel id="viewport-panel" defaultSize={
|
|
99
|
+
<Panel id="viewport-panel" defaultSize={58} minSize={30}>
|
|
89
100
|
<div className="h-full w-full overflow-hidden">
|
|
90
101
|
<ViewportContainer />
|
|
91
102
|
</div>
|
|
@@ -93,16 +104,22 @@ export function ViewerLayout() {
|
|
|
93
104
|
|
|
94
105
|
<PanelResizeHandle className="w-1.5 bg-border hover:bg-primary/50 active:bg-primary/70 transition-colors cursor-col-resize" />
|
|
95
106
|
|
|
96
|
-
{/* Right Panel - Properties */}
|
|
107
|
+
{/* Right Panel - Properties, BCF, or IDS */}
|
|
97
108
|
<Panel
|
|
98
109
|
id="right-panel"
|
|
99
|
-
defaultSize={
|
|
100
|
-
minSize={
|
|
110
|
+
defaultSize={22}
|
|
111
|
+
minSize={15}
|
|
101
112
|
collapsible
|
|
102
113
|
collapsedSize={0}
|
|
103
114
|
>
|
|
104
115
|
<div className="h-full w-full overflow-hidden">
|
|
105
|
-
|
|
116
|
+
{idsPanelVisible ? (
|
|
117
|
+
<IDSPanel onClose={() => setIdsPanelVisible(false)} />
|
|
118
|
+
) : bcfPanelVisible ? (
|
|
119
|
+
<BCFPanel onClose={() => setBcfPanelVisible(false)} />
|
|
120
|
+
) : (
|
|
121
|
+
<PropertiesPanel />
|
|
122
|
+
)}
|
|
106
123
|
</div>
|
|
107
124
|
</Panel>
|
|
108
125
|
</PanelGroup>
|
|
@@ -137,14 +154,20 @@ export function ViewerLayout() {
|
|
|
137
154
|
</div>
|
|
138
155
|
)}
|
|
139
156
|
|
|
140
|
-
{/* Mobile Bottom Sheet - Properties */}
|
|
157
|
+
{/* Mobile Bottom Sheet - Properties, BCF, or IDS */}
|
|
141
158
|
{!rightPanelCollapsed && (
|
|
142
159
|
<div className="absolute inset-x-0 bottom-0 h-[50vh] bg-background border-t rounded-t-xl shadow-xl z-40 animate-in slide-in-from-bottom">
|
|
143
160
|
<div className="flex items-center justify-between p-2 border-b">
|
|
144
|
-
<span className="font-medium text-sm">
|
|
161
|
+
<span className="font-medium text-sm">
|
|
162
|
+
{idsPanelVisible ? 'IDS Validation' : bcfPanelVisible ? 'BCF Issues' : 'Properties'}
|
|
163
|
+
</span>
|
|
145
164
|
<button
|
|
146
165
|
className="p-1 hover:bg-muted rounded"
|
|
147
|
-
onClick={() =>
|
|
166
|
+
onClick={() => {
|
|
167
|
+
setRightPanelCollapsed(true);
|
|
168
|
+
if (bcfPanelVisible) setBcfPanelVisible(false);
|
|
169
|
+
if (idsPanelVisible) setIdsPanelVisible(false);
|
|
170
|
+
}}
|
|
148
171
|
>
|
|
149
172
|
<span className="sr-only">Close</span>
|
|
150
173
|
<svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
@@ -153,7 +176,13 @@ export function ViewerLayout() {
|
|
|
153
176
|
</button>
|
|
154
177
|
</div>
|
|
155
178
|
<div className="h-[calc(50vh-48px)] overflow-auto">
|
|
156
|
-
|
|
179
|
+
{idsPanelVisible ? (
|
|
180
|
+
<IDSPanel onClose={() => setIdsPanelVisible(false)} />
|
|
181
|
+
) : bcfPanelVisible ? (
|
|
182
|
+
<BCFPanel onClose={() => setBcfPanelVisible(false)} />
|
|
183
|
+
) : (
|
|
184
|
+
<PropertiesPanel />
|
|
185
|
+
)}
|
|
157
186
|
</div>
|
|
158
187
|
</div>
|
|
159
188
|
)}
|