@pascal-app/editor 1.1.0 → 1.1.2
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/package.json +9 -15
- package/src/components/editor/action-menu-button.tsx +1 -1
- package/src/components/editor/alignment-3d-guide-layer.tsx +1 -1
- package/src/components/editor/custom-camera-controls.tsx +11 -11
- package/src/components/editor/editor-layout-v2.tsx +1 -1
- package/src/components/editor/elevation-3d-guide-layer.tsx +1 -1
- package/src/components/editor/first-person-controls.tsx +20 -1981
- package/src/components/editor/floating-action-menu.tsx +1 -1
- package/src/components/editor/floating-building-action-menu.tsx +1 -1
- package/src/components/editor/floor-region-controls.tsx +6 -2
- package/src/components/editor/floorplan-navigation-presentation.test.ts +0 -40
- package/src/components/editor/floorplan-navigation-presentation.ts +0 -66
- package/src/components/editor/floorplan-panel.tsx +26 -22
- package/src/components/editor/floorplan-wall-typing-keys.ts +1 -1
- package/src/components/editor/follow-pascal.test.tsx +1 -2
- package/src/components/editor/follow-pascal.tsx +1 -1
- package/src/components/editor/footprint-height-handle.tsx +1 -1
- package/src/components/editor/group-actions.ts +1 -2
- package/src/components/editor/group-floating-action-menu.tsx +1 -1
- package/src/components/editor/group-move-3d.ts +1 -2
- package/src/components/editor/group-rotate-handle.tsx +1 -2
- package/src/components/editor/handles/use-handle-drag.ts +1 -2
- package/src/components/editor/index.tsx +24 -14
- package/src/components/editor/inspector-extension-actions.tsx +1 -1
- package/src/components/editor/node-arrow-handles.tsx +1 -1
- package/src/components/editor/open-wall-ends-3d-layer.tsx +1 -1
- package/src/components/editor/opening-guides-3d-layer.tsx +1 -1
- package/src/components/editor/room-controls.tsx +7 -4
- package/src/components/editor/room-handles-2d.tsx +2 -3
- package/src/components/editor/room-handles.tsx +1 -2
- package/src/components/editor/room-highlight.tsx +6 -105
- package/src/components/editor/room-labels.test.ts +8 -822
- package/src/components/editor/room-labels.tsx +40 -1671
- package/src/components/editor/room-webgpu-materials.test.ts +1 -1
- package/src/components/editor/selection-manager.tsx +5 -3
- package/src/components/editor/site-edge-labels.tsx +1 -1
- package/src/components/editor/snapshot-capture-overlay.tsx +2 -5
- package/src/components/editor/use-floorplan-background-placement.ts +2 -1
- package/src/components/editor/views/plugins-view.tsx +1 -1
- package/src/components/editor/views/view-bar.tsx +9 -9
- package/src/components/editor/wall-measurement-label.tsx +1 -1
- package/src/components/editor/wall-move-side-handles.tsx +1 -1
- package/src/components/editor/wall-pull-grip.tsx +2 -2
- package/src/components/editor-2d/floorplan-group-move.tsx +2 -3
- package/src/components/editor-2d/floorplan-measurement-tool-layer.tsx +1 -1
- package/src/components/editor-2d/floorplan-open-wall-ends-layer.tsx +1 -1
- package/src/components/editor-2d/floorplan-registry-move-overlay.tsx +1 -2
- package/src/components/editor-2d/renderers/floorplan-annotation-layout.test.ts +0 -37
- package/src/components/editor-2d/renderers/floorplan-annotation-layout.ts +0 -30
- package/src/components/editor-2d/renderers/floorplan-dimension-edit-overlay.tsx +13 -3
- package/src/components/editor-2d/renderers/floorplan-placement-preview-layer.tsx +1 -2
- package/src/components/editor-2d/renderers/floorplan-registry-layer.test.ts +8 -10
- package/src/components/editor-2d/renderers/floorplan-registry-layer.tsx +25 -33
- package/src/components/systems/roof/roof-edit-system.tsx +4 -3
- package/src/components/tools/distribution/distribution-run-tool.tsx +1 -1
- package/src/components/tools/item/placement-history.test.tsx +1 -1
- package/src/components/tools/item/use-placement-coordinator.tsx +2 -3
- package/src/components/tools/paint-region/wall-paint-region-tool.tsx +6 -2
- package/src/components/tools/registry/move-registry-node-tool.tsx +1 -2
- package/src/components/tools/shared/cursor-sphere.tsx +1 -1
- package/src/components/tools/shared/draft-measurement-label.tsx +1 -1
- package/src/components/tools/shared/placement-box.tsx +1 -1
- package/src/components/tools/shared/placement-dimension-guides.tsx +1 -1
- package/src/components/tools/site/terrain-brush-cursor.tsx +1 -1
- package/src/components/ui/action-menu/camera-actions.tsx +2 -2
- package/src/components/ui/action-menu/control-modes.tsx +1 -1
- package/src/components/ui/action-menu/follow-pascal-pill.tsx +1 -1
- package/src/components/ui/action-menu/index.tsx +3 -3
- package/src/components/ui/action-menu/measurement-control.tsx +3 -3
- package/src/components/ui/action-menu/placement.ts +0 -18
- package/src/components/ui/action-menu/point-ask-button.tsx +1 -1
- package/src/components/ui/action-menu/view-toggles.tsx +5 -5
- package/src/components/ui/controls/finish-swatch.tsx +1 -1
- package/src/components/ui/controls/material-paint-panel.tsx +2 -2
- package/src/components/ui/controls/scene-material-list.tsx +2 -2
- package/src/components/ui/controls/select-control.tsx +1 -1
- package/src/components/ui/controls/terrain-sculpt-panel.tsx +1 -1
- package/src/components/ui/floating-level-selector.tsx +3 -3
- package/src/components/ui/helpers/contextual-helper-panel.tsx +1 -1
- package/src/components/ui/helpers/helper-manager.test.tsx +1 -1
- package/src/components/ui/helpers/helper-manager.tsx +1 -1
- package/src/components/ui/level-duplicate-dialog.tsx +1 -1
- package/src/components/ui/node-icon-image.test.tsx +46 -0
- package/src/components/ui/node-icon-image.tsx +33 -1
- package/src/components/ui/panels/collections/collections-popover.tsx +2 -2
- package/src/components/ui/panels/floor-foundation-panel.tsx +2 -2
- package/src/components/ui/panels/floor-opening-panel.tsx +4 -4
- package/src/components/ui/panels/node-display.ts +1 -1
- package/src/components/ui/panels/panel-manager.tsx +1 -1
- package/src/components/ui/panels/panel-wrapper.tsx +1 -1
- package/src/components/ui/panels/parametric-inspector.tsx +1 -1
- package/src/components/ui/panels/room-construction-rows.tsx +6 -6
- package/src/components/ui/panels/room-name-options.ts +1 -5
- package/src/components/ui/panels/room-panel.tsx +6 -8
- package/src/components/ui/primitives/color-dot.tsx +2 -2
- package/src/components/ui/primitives/opacity-control.tsx +2 -2
- package/src/components/ui/primitives/sidebar.tsx +3 -3
- package/src/components/ui/right-stack.tsx +1 -1
- package/src/components/ui/sidebar/icon-rail.tsx +1 -1
- package/src/components/ui/sidebar/panels/items-panel/function-tree-panel.tsx +1 -1
- package/src/components/ui/sidebar/panels/settings-panel/audio-settings-dialog.tsx +2 -2
- package/src/components/ui/sidebar/panels/settings-panel/construction-animation-setting.tsx +1 -1
- package/src/components/ui/sidebar/panels/settings-panel/index.tsx +2 -2
- package/src/components/ui/sidebar/panels/settings-panel/keyboard-shortcuts-dialog.tsx +1 -1
- package/src/components/ui/sidebar/panels/settings-panel/load-build-dialog.tsx +1 -1
- package/src/components/ui/sidebar/panels/settings-panel/print-export-button.tsx +1 -1
- package/src/components/ui/sidebar/panels/site-panel/building-tree-node.tsx +1 -1
- package/src/components/ui/sidebar/panels/site-panel/index.tsx +2 -2
- package/src/components/ui/sidebar/panels/site-panel/inline-rename-input.tsx +1 -1
- package/src/components/ui/sidebar/panels/site-panel/level-tree-node.tsx +1 -1
- package/src/components/ui/sidebar/panels/site-panel/roof-tree-node.tsx +46 -7
- package/src/components/ui/sidebar/panels/site-panel/tree-node-actions.tsx +1 -1
- package/src/components/ui/sidebar/panels/site-panel/tree-node-drag.tsx +14 -5
- package/src/components/ui/sidebar/panels/site-panel/unit-tree-node.tsx +2 -2
- package/src/components/ui/sidebar/panels/zone-panel/index.tsx +3 -3
- package/src/components/ui/sidebar/tab-bar.tsx +1 -1
- package/src/components/ui/wall-type/wall-type-editor-dialog.tsx +1 -1
- package/src/components/ui/wall-type/wall-type-menu.tsx +1 -1
- package/src/components/viewer-overlay.tsx +1 -2
- package/src/hooks/use-auto-frame.ts +1 -2
- package/src/hooks/use-keyboard.ts +1 -2
- package/src/hooks/use-selected-room.ts +5 -7
- package/src/i18n/floor-footprint-name.ts +1 -1
- package/src/i18n/locales/en/messages.po +180 -182
- package/src/i18n/locales/es/messages.po +180 -182
- package/src/i18n/locales/fr/messages.po +180 -182
- package/src/i18n/locales/ja/messages.po +180 -182
- package/src/i18n/locales/zh-CN/messages.po +180 -182
- package/src/i18n/locales.test.ts +1 -1
- package/src/index.tsx +109 -131
- package/src/lib/below-grade.test.tsx +4 -4
- package/src/lib/camera-facing.test.ts +1 -1
- package/src/lib/camera-facing.ts +2 -3
- package/src/lib/editor-level-display.ts +1 -1
- package/src/lib/floor-footprints.test.ts +2 -2
- package/src/lib/floor-opening-draft.ts +1 -1
- package/src/lib/floorplan/annotation-visibility.test.ts +1 -1
- package/src/lib/floorplan/annotation-visibility.ts +1 -1
- package/src/lib/floorplan/floorplan-export.test.ts +1 -1
- package/src/lib/floorplan/floorplan-export.tsx +8 -11
- package/src/lib/floorplan/floorplan-extension.ts +4 -157
- package/src/lib/floorplan/floorplan-mode.ts +2 -1
- package/src/lib/floorplan/floorplan-pdfkit-renderer.test.ts +1 -1
- package/src/lib/floorplan/floorplan-pdfkit-renderer.ts +8 -6
- package/src/lib/floorplan/floorplan-plugin-install.test.tsx +3 -4
- package/src/lib/floorplan/geometry.ts +2 -112
- package/src/lib/floorplan/index.ts +0 -9
- package/src/lib/floorplan/items.ts +2 -1
- package/src/lib/floorplan/schedules.ts +6 -3
- package/src/lib/floorplan/sheet-export.ts +7 -3
- package/src/lib/floorplan/site-plan/site-parts.ts +7 -1
- package/src/lib/floorplan/site-plan/site-plan-layer.tsx +1 -1
- package/src/lib/follow-pascal-presentation.ts +1 -1
- package/src/lib/glb-export.ts +1 -1
- package/src/lib/material-paint.ts +1 -1
- package/src/lib/measurements.test.ts +2 -1
- package/src/lib/mezzanine-selection.test.ts +1 -1
- package/src/lib/paint-region-mode.ts +1 -1
- package/src/lib/point-ask/session.ts +1 -2
- package/src/lib/roof-duplication.test.ts +100 -0
- package/src/lib/roof-duplication.ts +30 -5
- package/src/lib/room-handle-drag.ts +2 -12
- package/src/lib/room-name-catalog.test.ts +2 -1
- package/src/lib/room-name-messages.test.ts +2 -1
- package/src/lib/room-name-messages.ts +1 -118
- package/src/lib/room-name-storage.test.ts +2 -1
- package/src/lib/room-selection-commands.ts +2 -2
- package/src/lib/room-selection.test.ts +6 -6
- package/src/lib/room-transform-session.ts +1 -2
- package/src/lib/room-zone-routing.ts +2 -2
- package/src/lib/selection-routing.test.ts +0 -28
- package/src/lib/selection-routing.ts +1 -40
- package/src/lib/sfx-bus.ts +8 -32
- package/src/lib/sfx-player.test.ts +72 -1
- package/src/lib/sfx-player.ts +49 -337
- package/src/lib/viewer-selection.test.ts +38 -10
- package/src/lib/wall-pull.test.ts +1 -1
- package/src/lib/wall-pull.ts +1 -27
- package/src/store/use-editor.tsx +17 -26
- package/src/store/use-floorplan-annotation-visibility.ts +5 -5
- package/src/store/use-wall-region-handles-selection.ts +1 -2
- package/src/components/editor/__bench__/room-label-placement.bench.ts +0 -108
- package/src/components/editor/first-person/build-collider-world.test.ts +0 -596
- package/src/components/editor/first-person/build-collider-world.ts +0 -549
- package/src/components/editor/first-person/ground-holes.test.ts +0 -128
- package/src/components/editor/first-person/ground-holes.ts +0 -130
- package/src/components/editor/first-person/mechanism-targets.test.ts +0 -162
- package/src/components/editor/first-person/mechanism-targets.ts +0 -88
- package/src/components/editor/first-person/terrain-collider.test.ts +0 -132
- package/src/components/editor/first-person/terrain-collider.ts +0 -212
- package/src/components/editor/floorplan-camera-sync.test.ts +0 -249
- package/src/components/editor/floorplan-camera-sync.ts +0 -213
- package/src/components/editor/localized-html.tsx +0 -22
- package/src/components/editor-2d/renderers/floorplan-dimension-renderer.test.tsx +0 -236
- package/src/components/editor-2d/renderers/floorplan-dimension-renderer.tsx +0 -708
- package/src/components/editor-2d/renderers/floorplan-geometry-renderer.test.tsx +0 -385
- package/src/components/editor-2d/renderers/floorplan-geometry-renderer.tsx +0 -670
- package/src/components/editor-2d/renderers/floorplan-label-angle.test.ts +0 -89
- package/src/components/editor-2d/renderers/floorplan-label-angle.ts +0 -106
- package/src/components/editor-2d/svg-paths.ts +0 -124
- package/src/components/ui/action-menu/action-button.tsx +0 -89
- package/src/components/ui/action-menu/follow-pascal-toggle.tsx +0 -42
- package/src/components/ui/primitives/button.tsx +0 -69
- package/src/components/ui/primitives/dropdown-menu.tsx +0 -232
- package/src/components/ui/primitives/popover.tsx +0 -42
- package/src/components/ui/primitives/switch.tsx +0 -29
- package/src/components/ui/primitives/tooltip.tsx +0 -57
- package/src/components/ui/scene-loader.tsx +0 -73
- package/src/components/viewer/floorplan-compass-button.tsx +0 -67
- package/src/components/viewer/floorplan-preview-geometry.test.ts +0 -107
- package/src/components/viewer/floorplan-preview-geometry.ts +0 -281
- package/src/components/viewer/floorplan-preview-navigation.test.ts +0 -43
- package/src/components/viewer/floorplan-preview-navigation.ts +0 -62
- package/src/components/viewer/floorplan-preview-visibility.test.ts +0 -35
- package/src/components/viewer/floorplan-preview-visibility.ts +0 -19
- package/src/components/viewer/floorplan-preview.tsx +0 -1065
- package/src/components/viewer/render-settings-menu.tsx +0 -294
- package/src/components/viewer/sky-control.tsx +0 -710
- package/src/components/viewer/use-viewer-camera-navigation-sync.ts +0 -140
- package/src/components/viewer/use-viewer-ui-sounds.test.ts +0 -15
- package/src/components/viewer/use-viewer-ui-sounds.ts +0 -46
- package/src/components/viewer/viewer-controls-bar.tsx +0 -496
- package/src/components/viewer/viewer-hover-label.tsx +0 -42
- package/src/components/viewer/viewer-rooms.tsx +0 -248
- package/src/components/viewer/viewer-scene-header.tsx +0 -286
- package/src/components/viewer/viewer-selection-manager.tsx +0 -124
- package/src/components/viewer/viewer-stage-modes.test.ts +0 -38
- package/src/components/viewer/viewer-stage-modes.ts +0 -49
- package/src/components/viewer/viewer-stage-switcher.tsx +0 -97
- package/src/components/viewer/viewer-stage.test.tsx +0 -47
- package/src/components/viewer/viewer-stage.tsx +0 -221
- package/src/components/walkthrough-hud.tsx +0 -193
- package/src/hooks/use-mobile.ts +0 -19
- package/src/i18n/level-name.ts +0 -39
- package/src/i18n/scene-theme-name.ts +0 -16
- package/src/lib/below-grade.ts +0 -133
- package/src/lib/camera-pose.test.ts +0 -237
- package/src/lib/camera-pose.ts +0 -172
- package/src/lib/floorplan/floorplan-extension.test.ts +0 -42
- package/src/lib/floorplan/floorplan-readonly.test.ts +0 -47
- package/src/lib/floorplan/floorplan-readonly.ts +0 -95
- package/src/lib/floorplan/marks.test.ts +0 -213
- package/src/lib/floorplan/marks.ts +0 -238
- package/src/lib/measurements.ts +0 -8
- package/src/lib/node-display-label.ts +0 -37
- package/src/lib/room-assembly-overlay.test.ts +0 -275
- package/src/lib/room-assembly-overlay.ts +0 -265
- package/src/lib/room-selection.ts +0 -417
- package/src/lib/scene-bounds.test.ts +0 -327
- package/src/lib/scene-bounds.ts +0 -233
- package/src/lib/typing-target.ts +0 -9
- package/src/lib/viewer-selection.ts +0 -595
- package/src/lib/zone-content.ts +0 -133
- package/src/store/camera-pose-store.test.ts +0 -29
- package/src/store/camera-pose-store.ts +0 -27
- package/src/store/navigation-sync-pose-store.test.ts +0 -34
- package/src/store/navigation-sync-pose-store.ts +0 -27
- package/src/store/use-audio.test.ts +0 -146
- package/src/store/use-audio.tsx +0 -169
- package/src/store/use-first-person-hud.ts +0 -40
- package/src/store/use-follow-pascal.test.ts +0 -62
- package/src/store/use-follow-pascal.ts +0 -53
package/src/i18n/locales.test.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { afterEach, expect, test } from 'bun:test'
|
|
2
2
|
import { createI18n, setLocale, translate } from '@pascal-app/core'
|
|
3
|
-
import { authoredLevelName, localizedLevelName } from '
|
|
3
|
+
import { authoredLevelName, localizedLevelName } from '@pascal-app/viewer/ui'
|
|
4
4
|
import { registerBundledLocales } from './locales'
|
|
5
5
|
|
|
6
6
|
afterEach(() => setLocale('en'))
|
package/src/index.tsx
CHANGED
|
@@ -16,9 +16,14 @@ export {
|
|
|
16
16
|
applyScenePatch,
|
|
17
17
|
applySceneSnapshot,
|
|
18
18
|
buildMeasurementAngleArcPoints,
|
|
19
|
+
buildSvgAnnularSectorPath,
|
|
20
|
+
buildSvgArcPath,
|
|
21
|
+
buildSvgArrowHeadPoints,
|
|
19
22
|
type CompiledTranslationMessages,
|
|
23
|
+
clampPlanValue,
|
|
20
24
|
closeDoorOpenState,
|
|
21
25
|
closeWindowOpenState,
|
|
26
|
+
createFloorplanContextExtensions,
|
|
22
27
|
createI18n,
|
|
23
28
|
cubicMetersToVolumeUnit,
|
|
24
29
|
DEFAULT_CURVED_STAIR_INNER_RADIUS,
|
|
@@ -37,36 +42,59 @@ export {
|
|
|
37
42
|
DEFAULT_STAIR_TYPE,
|
|
38
43
|
DEFAULT_STAIR_WIDTH,
|
|
39
44
|
defaultI18n,
|
|
45
|
+
FLOORPLAN_CONTEXT_EXTENSION_KEY,
|
|
46
|
+
FLOORPLAN_GEOMETRY_METADATA_KEY,
|
|
47
|
+
type FloorplanAnnotationRole,
|
|
48
|
+
type FloorplanMetricNotation,
|
|
49
|
+
type FloorplanRenderPurpose,
|
|
50
|
+
type FloorplanSchedule,
|
|
51
|
+
type FloorplanWallDimensionFaces,
|
|
52
|
+
floorplanGeometryMetadata,
|
|
40
53
|
formatAngleRadians,
|
|
41
54
|
formatAreaLabel,
|
|
42
55
|
formatLength,
|
|
43
56
|
formatLinearMeasurement,
|
|
44
57
|
formatNumber,
|
|
45
58
|
formatVolumeLabel,
|
|
59
|
+
getArcPlanPoint,
|
|
46
60
|
getAreaUnitLabel,
|
|
47
61
|
getDisplayedDoorValue,
|
|
48
62
|
getDisplayedWindowShutterValue,
|
|
49
63
|
getDisplayedWindowValue,
|
|
50
64
|
getLinearUnitLabel,
|
|
51
65
|
getLocale,
|
|
66
|
+
getPlanPointDistance,
|
|
67
|
+
getThickPlanLinePolygon,
|
|
52
68
|
getVolumeUnitLabel,
|
|
69
|
+
interpolatePlanPoint,
|
|
53
70
|
isOperableWindowType,
|
|
54
71
|
type LinearUnit,
|
|
55
72
|
linearControlValueToMeters,
|
|
56
73
|
linearUnitToMeters,
|
|
74
|
+
type MarkResolution,
|
|
57
75
|
metersToLinearUnit,
|
|
76
|
+
movePlanPointTowards,
|
|
58
77
|
normalizeDecimalInput,
|
|
78
|
+
type OpeningMarkKind,
|
|
59
79
|
openDoorOpenState,
|
|
60
80
|
openWindowOpenState,
|
|
81
|
+
orderedOpenings,
|
|
61
82
|
type PascalI18n,
|
|
62
83
|
PascalI18nProvider,
|
|
63
84
|
parseLinearMeasurementInput,
|
|
64
85
|
parseLocalizedNumber,
|
|
86
|
+
persistResolvedMarks,
|
|
87
|
+
readFloorplanContext,
|
|
88
|
+
readFloorplanGeometryMetadata,
|
|
89
|
+
readFloorplanMetricNotationOverride,
|
|
65
90
|
registerCompiledMessages,
|
|
66
91
|
registerMessages,
|
|
67
92
|
resolveElevatorNodeSupportY,
|
|
68
93
|
resolveElevatorSupportLevelId,
|
|
69
94
|
resolveElevatorSupportY,
|
|
95
|
+
resolveMarkDetail,
|
|
96
|
+
resolveMarks,
|
|
97
|
+
rotatePlanVector,
|
|
70
98
|
type SceneCommit,
|
|
71
99
|
type SceneCommitListener,
|
|
72
100
|
type SceneCommitOrigin,
|
|
@@ -87,18 +115,98 @@ export {
|
|
|
87
115
|
useLocale,
|
|
88
116
|
usePascalI18n,
|
|
89
117
|
useScene,
|
|
118
|
+
WALL_PULL_AFFORDANCE,
|
|
119
|
+
WALL_PULL_GRIP_TITLE,
|
|
120
|
+
WALL_PUSH_AFFORDANCE,
|
|
121
|
+
type WallPullGripPayload,
|
|
122
|
+
type WallPushArrowPayload,
|
|
90
123
|
type WindowOpenAnimationOptions,
|
|
91
124
|
type WindowShutterField,
|
|
125
|
+
wallPullSeed,
|
|
126
|
+
withFloorplanGeometryMetadata,
|
|
92
127
|
} from '@pascal-app/core'
|
|
93
128
|
export {
|
|
129
|
+
isTypingTarget,
|
|
94
130
|
MEASUREMENT_ACTIVE_COLOR,
|
|
95
131
|
MEASUREMENT_DANGLING_COLOR,
|
|
132
|
+
MEASUREMENT_FLOORPLAN_COLOR,
|
|
96
133
|
MEASUREMENT_PERSISTENT_COLOR,
|
|
134
|
+
measurementFloorplanPresentationColor,
|
|
97
135
|
measurementPolygonLabelAnchor,
|
|
98
136
|
measurementPresentationColor,
|
|
99
137
|
triangulateMeasurementPolygon,
|
|
100
138
|
useViewer,
|
|
101
139
|
} from '@pascal-app/viewer'
|
|
140
|
+
export { useAudioSettings as useAudio, useViewerUiSounds } from '@pascal-app/viewer/sfx'
|
|
141
|
+
export type { ActionMenuPlacement, RoomKey, RoomSelectionRecord } from '@pascal-app/viewer/ui'
|
|
142
|
+
export {
|
|
143
|
+
applyViewerClick,
|
|
144
|
+
applyViewerHover,
|
|
145
|
+
DaylightMenu,
|
|
146
|
+
DroneHud,
|
|
147
|
+
DropdownMenu,
|
|
148
|
+
DropdownMenuContent,
|
|
149
|
+
DropdownMenuGroup,
|
|
150
|
+
DropdownMenuItem,
|
|
151
|
+
DropdownMenuLabel,
|
|
152
|
+
DropdownMenuSeparator,
|
|
153
|
+
DropdownMenuSub,
|
|
154
|
+
DropdownMenuSubContent,
|
|
155
|
+
DropdownMenuSubTrigger,
|
|
156
|
+
DropdownMenuTrigger,
|
|
157
|
+
displayRoomName,
|
|
158
|
+
EdgesToggleItem,
|
|
159
|
+
type FirstPersonHudState,
|
|
160
|
+
FloorplanCompassButton,
|
|
161
|
+
type FloorplanCompassButtonProps,
|
|
162
|
+
FloorplanDimensionRenderer,
|
|
163
|
+
FloorplanGeometryRenderer,
|
|
164
|
+
FloorplanPreview,
|
|
165
|
+
type FloorplanPreviewProps,
|
|
166
|
+
type FloorplanPreviewScene,
|
|
167
|
+
framedLookAt,
|
|
168
|
+
frameViewerCamera,
|
|
169
|
+
frameViewerNode,
|
|
170
|
+
LocalizedHtml,
|
|
171
|
+
localizedLevelName,
|
|
172
|
+
normalizeViewerStageModes,
|
|
173
|
+
openSkyPanel,
|
|
174
|
+
ParametricViewerRooms,
|
|
175
|
+
QualityMenu,
|
|
176
|
+
resolveMobileViewerStageMode,
|
|
177
|
+
resolveViewerStageMode,
|
|
178
|
+
SceneLoader,
|
|
179
|
+
SkyControl,
|
|
180
|
+
sceneThemeName,
|
|
181
|
+
subscribeCameraPose,
|
|
182
|
+
Tooltip,
|
|
183
|
+
TooltipContent,
|
|
184
|
+
TooltipTrigger,
|
|
185
|
+
useFirstPersonHud,
|
|
186
|
+
useFollowPascal,
|
|
187
|
+
useSkyPanel,
|
|
188
|
+
useViewerCameraNavigationSync,
|
|
189
|
+
useViewerFloorDisplay,
|
|
190
|
+
VIEWER_STAGE_MODES,
|
|
191
|
+
ViewerControlsBar,
|
|
192
|
+
type ViewerControlsBarProps,
|
|
193
|
+
ViewerHoverLabel,
|
|
194
|
+
type ViewerPick,
|
|
195
|
+
ViewerRooms,
|
|
196
|
+
ViewerSceneHeader,
|
|
197
|
+
type ViewerSceneHeaderProps,
|
|
198
|
+
ViewerSelectionManager,
|
|
199
|
+
type ViewerSource,
|
|
200
|
+
ViewerStage,
|
|
201
|
+
type ViewerStageMode,
|
|
202
|
+
type ViewerStageProps,
|
|
203
|
+
ViewerStageSwitcher,
|
|
204
|
+
type ViewerStageSwitcherProps,
|
|
205
|
+
viewerStageIncludes3D,
|
|
206
|
+
WalkthroughHud,
|
|
207
|
+
type WalkthroughHudProps,
|
|
208
|
+
type WalkthroughInteract,
|
|
209
|
+
} from '@pascal-app/viewer/ui'
|
|
102
210
|
export type { EditorProps } from './components/editor'
|
|
103
211
|
export { default as Editor } from './components/editor'
|
|
104
212
|
export { ActionMenuButton } from './components/editor/action-menu-button'
|
|
@@ -134,7 +242,6 @@ export { FloatingActionMenu as FloatingMenu } from './components/editor/floating
|
|
|
134
242
|
// flags. Tools place onto `useViewer.selection.levelId`, so the host must set a
|
|
135
243
|
// building + level selection first.
|
|
136
244
|
export { EDITOR_GRID_INPUT_NAME, Grid } from './components/editor/grid'
|
|
137
|
-
export { Html as LocalizedHtml } from './components/editor/localized-html'
|
|
138
245
|
export {
|
|
139
246
|
DimensionPill,
|
|
140
247
|
type DimensionPillPart,
|
|
@@ -175,12 +282,10 @@ export { WallMoveSideHandles } from './components/editor/wall-move-side-handles'
|
|
|
175
282
|
export { WallPushArrow } from './components/editor/wall-push-arrow'
|
|
176
283
|
export { useWallsBelowSetting } from './components/editor-2d/floorplan-adjacent-walls-layer'
|
|
177
284
|
export { useFloorplanRender } from './components/editor-2d/floorplan-render-context'
|
|
178
|
-
export { FloorplanDimensionRenderer } from './components/editor-2d/renderers/floorplan-dimension-renderer'
|
|
179
285
|
export {
|
|
180
286
|
type DraftMeasurement,
|
|
181
287
|
FloorplanDraftMeasurement,
|
|
182
288
|
} from './components/editor-2d/renderers/floorplan-draft-measurement'
|
|
183
|
-
export { FloorplanGeometryRenderer } from './components/editor-2d/renderers/floorplan-geometry-renderer'
|
|
184
289
|
export {
|
|
185
290
|
FloorplanNodePreview,
|
|
186
291
|
type FloorplanNodePreviewProps,
|
|
@@ -188,12 +293,6 @@ export {
|
|
|
188
293
|
// SVG path builders for arc / annular-sector / arrow-head shapes —
|
|
189
294
|
// inlined into `kind: 'path'` / `kind: 'polygon'` primitives by curved
|
|
190
295
|
// stair rendering in `nodes/src/stair/floorplan.ts`.
|
|
191
|
-
export {
|
|
192
|
-
buildSvgAnnularSectorPath,
|
|
193
|
-
buildSvgArcPath,
|
|
194
|
-
buildSvgArrowHeadPoints,
|
|
195
|
-
getArcPlanPoint,
|
|
196
|
-
} from './components/editor-2d/svg-paths'
|
|
197
296
|
export { useCeilingsSetting } from './components/systems/ceiling/ceiling-system'
|
|
198
297
|
export type {
|
|
199
298
|
SelectionAffordanceHistoryApi,
|
|
@@ -315,7 +414,6 @@ export {
|
|
|
315
414
|
CameraActions as ViewerToolbarRight,
|
|
316
415
|
} from './components/ui/action-menu/camera-actions'
|
|
317
416
|
export { furnishTools } from './components/ui/action-menu/furnish-tools'
|
|
318
|
-
export type { ActionMenuPlacement } from './components/ui/action-menu/placement'
|
|
319
417
|
export {
|
|
320
418
|
ViewToggles as ToolbarLeft,
|
|
321
419
|
ViewToggles as ViewerToolbarLeft,
|
|
@@ -378,26 +476,12 @@ export { ScriptedFinishRow } from './components/ui/panels/room-panel'
|
|
|
378
476
|
export { ShapeChoice } from './components/ui/panels/shape-choice'
|
|
379
477
|
export { WallPaintRegionList } from './components/ui/panels/wall-region-list'
|
|
380
478
|
export { PALETTE_COLORS } from './components/ui/primitives/color-dot'
|
|
381
|
-
export {
|
|
382
|
-
DropdownMenu,
|
|
383
|
-
DropdownMenuContent,
|
|
384
|
-
DropdownMenuGroup,
|
|
385
|
-
DropdownMenuItem,
|
|
386
|
-
DropdownMenuLabel,
|
|
387
|
-
DropdownMenuSeparator,
|
|
388
|
-
DropdownMenuSub,
|
|
389
|
-
DropdownMenuSubContent,
|
|
390
|
-
DropdownMenuSubTrigger,
|
|
391
|
-
DropdownMenuTrigger,
|
|
392
|
-
} from './components/ui/primitives/dropdown-menu'
|
|
393
479
|
export {
|
|
394
480
|
ShortcutToken,
|
|
395
481
|
shortcutDisplayValue,
|
|
396
482
|
} from './components/ui/primitives/shortcut-token'
|
|
397
483
|
export { useSidebarStore } from './components/ui/primitives/sidebar'
|
|
398
484
|
export { Slider } from './components/ui/primitives/slider'
|
|
399
|
-
export { Tooltip, TooltipContent, TooltipTrigger } from './components/ui/primitives/tooltip'
|
|
400
|
-
export { SceneLoader } from './components/ui/scene-loader'
|
|
401
485
|
export type { ExtraPanel } from './components/ui/sidebar/icon-rail'
|
|
402
486
|
export { ItemsPanel } from './components/ui/sidebar/panels/items-panel'
|
|
403
487
|
export type { FunctionTreeNode } from './components/ui/sidebar/panels/items-panel/function-tree-panel'
|
|
@@ -420,53 +504,6 @@ export {
|
|
|
420
504
|
} from './components/ui/snap-target-badge'
|
|
421
505
|
// A wall's project wall types: new, edit, duplicate (the wall panel's Assembly).
|
|
422
506
|
export { WallTypeMenu } from './components/ui/wall-type/wall-type-menu'
|
|
423
|
-
export {
|
|
424
|
-
FloorplanCompassButton,
|
|
425
|
-
type FloorplanCompassButtonProps,
|
|
426
|
-
} from './components/viewer/floorplan-compass-button'
|
|
427
|
-
export {
|
|
428
|
-
FloorplanPreview,
|
|
429
|
-
type FloorplanPreviewProps,
|
|
430
|
-
type FloorplanPreviewScene,
|
|
431
|
-
} from './components/viewer/floorplan-preview'
|
|
432
|
-
export {
|
|
433
|
-
DaylightMenu,
|
|
434
|
-
EdgesToggleItem,
|
|
435
|
-
QualityMenu,
|
|
436
|
-
} from './components/viewer/render-settings-menu'
|
|
437
|
-
export { openSkyPanel, SkyControl, useSkyPanel } from './components/viewer/sky-control'
|
|
438
|
-
export { useViewerCameraNavigationSync } from './components/viewer/use-viewer-camera-navigation-sync'
|
|
439
|
-
export { useViewerUiSounds } from './components/viewer/use-viewer-ui-sounds'
|
|
440
|
-
export {
|
|
441
|
-
ViewerControlsBar,
|
|
442
|
-
type ViewerControlsBarProps,
|
|
443
|
-
} from './components/viewer/viewer-controls-bar'
|
|
444
|
-
export { ViewerHoverLabel } from './components/viewer/viewer-hover-label'
|
|
445
|
-
export { ParametricViewerRooms, ViewerRooms } from './components/viewer/viewer-rooms'
|
|
446
|
-
export {
|
|
447
|
-
ViewerSceneHeader,
|
|
448
|
-
type ViewerSceneHeaderProps,
|
|
449
|
-
} from './components/viewer/viewer-scene-header'
|
|
450
|
-
export { ViewerSelectionManager } from './components/viewer/viewer-selection-manager'
|
|
451
|
-
export { ViewerStage, type ViewerStageProps } from './components/viewer/viewer-stage'
|
|
452
|
-
export {
|
|
453
|
-
normalizeViewerStageModes,
|
|
454
|
-
resolveMobileViewerStageMode,
|
|
455
|
-
resolveViewerStageMode,
|
|
456
|
-
VIEWER_STAGE_MODES,
|
|
457
|
-
viewerStageIncludes3D,
|
|
458
|
-
} from './components/viewer/viewer-stage-modes'
|
|
459
|
-
export {
|
|
460
|
-
type ViewerStageMode,
|
|
461
|
-
ViewerStageSwitcher,
|
|
462
|
-
type ViewerStageSwitcherProps,
|
|
463
|
-
} from './components/viewer/viewer-stage-switcher'
|
|
464
|
-
export {
|
|
465
|
-
DroneHud,
|
|
466
|
-
WalkthroughHud,
|
|
467
|
-
type WalkthroughHudProps,
|
|
468
|
-
type WalkthroughInteract,
|
|
469
|
-
} from './components/walkthrough-hud'
|
|
470
507
|
export type { SaveStatus } from './hooks/use-auto-save'
|
|
471
508
|
// useDragAction is the React-side glue for the registry's DragAction
|
|
472
509
|
// primitive. Public so registry-driven kinds (Phase 5+ Stage D ports)
|
|
@@ -478,7 +515,6 @@ export { usePlacementNotice } from './hooks/use-placement-notice'
|
|
|
478
515
|
export { useReducedMotion } from './hooks/use-reduced-motion'
|
|
479
516
|
export { useSelectedRoom } from './hooks/use-selected-room'
|
|
480
517
|
export { type Selection, useSelection } from './hooks/use-selection'
|
|
481
|
-
export { localizedLevelName } from './i18n/level-name'
|
|
482
518
|
export {
|
|
483
519
|
messageSlug,
|
|
484
520
|
nodeDescriptionDescriptor,
|
|
@@ -489,7 +525,6 @@ export {
|
|
|
489
525
|
toolHintKey,
|
|
490
526
|
toolHintLabel,
|
|
491
527
|
} from './i18n/node-messages'
|
|
492
|
-
export { sceneThemeName } from './i18n/scene-theme-name'
|
|
493
528
|
export {
|
|
494
529
|
clearPlacementSurface,
|
|
495
530
|
getPlacementSurface,
|
|
@@ -568,16 +603,10 @@ export { startOpeningDraft } from './lib/floor-opening-draft'
|
|
|
568
603
|
export {
|
|
569
604
|
alignFloorplanDraftPoint,
|
|
570
605
|
applyFloorplanAlignment,
|
|
571
|
-
clampPlanValue,
|
|
572
606
|
FLOORPLAN_ALIGNMENT_THRESHOLD_M,
|
|
573
607
|
FLOORPLAN_DRAFT_ALIGN_ID,
|
|
574
608
|
type FloorplanAlignmentResult,
|
|
575
609
|
getFloorplanWallThickness,
|
|
576
|
-
getPlanPointDistance,
|
|
577
|
-
getThickPlanLinePolygon,
|
|
578
|
-
interpolatePlanPoint,
|
|
579
|
-
movePlanPointTowards,
|
|
580
|
-
rotatePlanVector,
|
|
581
610
|
} from './lib/floorplan'
|
|
582
611
|
export type {
|
|
583
612
|
FloorplanAnnotationCategory,
|
|
@@ -599,24 +628,11 @@ export {
|
|
|
599
628
|
type FloorplanExportScope,
|
|
600
629
|
} from './lib/floorplan/floorplan-export'
|
|
601
630
|
export {
|
|
602
|
-
createFloorplanContextExtensions,
|
|
603
|
-
FLOORPLAN_CONTEXT_EXTENSION_KEY,
|
|
604
|
-
FLOORPLAN_GEOMETRY_METADATA_KEY,
|
|
605
631
|
FLOORPLAN_NODE_EXTENSION_KEY,
|
|
606
|
-
type FloorplanAnnotationRole,
|
|
607
|
-
type FloorplanMetricNotation,
|
|
608
632
|
type FloorplanNodeExtension,
|
|
609
|
-
type FloorplanRenderPurpose,
|
|
610
|
-
type FloorplanSchedule,
|
|
611
633
|
type FloorplanToolContext,
|
|
612
634
|
type FloorplanToolMode,
|
|
613
|
-
type FloorplanWallDimensionFaces,
|
|
614
|
-
floorplanGeometryMetadata,
|
|
615
635
|
getFloorplanNodeExtension,
|
|
616
|
-
readFloorplanContext,
|
|
617
|
-
readFloorplanGeometryMetadata,
|
|
618
|
-
readFloorplanMetricNotationOverride,
|
|
619
|
-
withFloorplanGeometryMetadata,
|
|
620
636
|
} from './lib/floorplan/floorplan-extension'
|
|
621
637
|
export {
|
|
622
638
|
DEFAULT_FLOORPLAN_MODE,
|
|
@@ -624,14 +640,6 @@ export {
|
|
|
624
640
|
type FloorplanMode,
|
|
625
641
|
isFloorplanToolAvailableInMode,
|
|
626
642
|
} from './lib/floorplan/floorplan-mode'
|
|
627
|
-
export {
|
|
628
|
-
type MarkResolution,
|
|
629
|
-
type OpeningMarkKind,
|
|
630
|
-
orderedOpenings,
|
|
631
|
-
persistResolvedMarks,
|
|
632
|
-
resolveMarkDetail,
|
|
633
|
-
resolveMarks,
|
|
634
|
-
} from './lib/floorplan/marks'
|
|
635
643
|
export { clientToPlan } from './lib/floorplan/plan-coords'
|
|
636
644
|
export {
|
|
637
645
|
doorSchedule,
|
|
@@ -802,10 +810,6 @@ export {
|
|
|
802
810
|
type ParseMeasurementOptions,
|
|
803
811
|
parseMeasurement,
|
|
804
812
|
} from './lib/measurement-parser'
|
|
805
|
-
export {
|
|
806
|
-
MEASUREMENT_FLOORPLAN_COLOR,
|
|
807
|
-
measurementFloorplanPresentationColor,
|
|
808
|
-
} from './lib/measurements'
|
|
809
813
|
export type {
|
|
810
814
|
ModelExport,
|
|
811
815
|
ModelExportArtifact,
|
|
@@ -883,14 +887,7 @@ export { clearRoofDuplicateMetadata, duplicateRoofSubtree } from './lib/roof-dup
|
|
|
883
887
|
// kind-owned door / window tools in `@pascal-app/nodes` and the item
|
|
884
888
|
// placement coordinator's roof-wall strategy.
|
|
885
889
|
export { hasRoofFaceChildOverlap, type RoofWallHit, resolveRoofWallHit } from './lib/roof-wall-hit'
|
|
886
|
-
export {
|
|
887
|
-
selectedWallDimensions,
|
|
888
|
-
separatorPushHandles,
|
|
889
|
-
WALL_PUSH_AFFORDANCE,
|
|
890
|
-
type WallPushArrowPayload,
|
|
891
|
-
} from './lib/room-handle-drag'
|
|
892
|
-
export { displayRoomName } from './lib/room-name-messages'
|
|
893
|
-
export type { RoomKey, RoomSelectionRecord } from './lib/room-selection'
|
|
890
|
+
export { selectedWallDimensions, separatorPushHandles } from './lib/room-handle-drag'
|
|
894
891
|
export { popRoomSelection, selectRoom } from './lib/room-selection-commands'
|
|
895
892
|
export {
|
|
896
893
|
captureElementActionOrigin,
|
|
@@ -970,7 +967,6 @@ export {
|
|
|
970
967
|
terrainPointInsideSite,
|
|
971
968
|
} from './lib/terrain-sculpt'
|
|
972
969
|
export { withToolShortcut } from './lib/tool-shortcuts'
|
|
973
|
-
export { isTypingTarget } from './lib/typing-target'
|
|
974
970
|
export { enterUnitFocus } from './lib/units'
|
|
975
971
|
export { exportSceneToUsdz, type UsdzExportOptions } from './lib/usdz-export'
|
|
976
972
|
export { useLinearDisplay } from './lib/use-linear-display'
|
|
@@ -978,16 +974,6 @@ export { useLinearDisplay } from './lib/use-linear-display'
|
|
|
978
974
|
// nodes` so they don't need their own copy / their own tailwind-merge
|
|
979
975
|
// dependency.
|
|
980
976
|
export { cn } from './lib/utils'
|
|
981
|
-
export {
|
|
982
|
-
applyViewerClick,
|
|
983
|
-
applyViewerHover,
|
|
984
|
-
framedLookAt,
|
|
985
|
-
frameViewerCamera,
|
|
986
|
-
frameViewerNode,
|
|
987
|
-
useViewerFloorDisplay,
|
|
988
|
-
type ViewerPick,
|
|
989
|
-
type ViewerSource,
|
|
990
|
-
} from './lib/viewer-selection'
|
|
991
977
|
export {
|
|
992
978
|
getWallDrawVariant,
|
|
993
979
|
getWallLineKind,
|
|
@@ -1028,12 +1014,8 @@ export {
|
|
|
1028
1014
|
releaseWallPullDrag,
|
|
1029
1015
|
startWallPull,
|
|
1030
1016
|
useWallPullRun,
|
|
1031
|
-
WALL_PULL_AFFORDANCE,
|
|
1032
|
-
WALL_PULL_GRIP_TITLE,
|
|
1033
|
-
type WallPullGripPayload,
|
|
1034
1017
|
type WallPullRun,
|
|
1035
1018
|
wallDraftIsRun,
|
|
1036
|
-
wallPullSeed,
|
|
1037
1019
|
wallPullTypePatch,
|
|
1038
1020
|
} from './lib/wall-pull'
|
|
1039
1021
|
export {
|
|
@@ -1058,13 +1040,11 @@ export {
|
|
|
1058
1040
|
snapBuildingLocalToWorldGrid,
|
|
1059
1041
|
snapWorldXZForActiveBuilding,
|
|
1060
1042
|
} from './lib/world-grid-snap'
|
|
1061
|
-
export { subscribeCameraPose } from './store/camera-pose-store'
|
|
1062
1043
|
export {
|
|
1063
1044
|
type DraftGuideLine,
|
|
1064
1045
|
type DraftGuides,
|
|
1065
1046
|
default as useAlignmentGuides,
|
|
1066
1047
|
} from './store/use-alignment-guides'
|
|
1067
|
-
export { default as useAudio } from './store/use-audio'
|
|
1068
1048
|
export { type CameraHintAction, useCameraHintFocus } from './store/use-camera-hint-focus'
|
|
1069
1049
|
export { type CommandAction, useCommandRegistry } from './store/use-command-registry'
|
|
1070
1050
|
export {
|
|
@@ -1119,11 +1099,9 @@ export {
|
|
|
1119
1099
|
} from './store/use-editor'
|
|
1120
1100
|
export { default as useFacingPose, type FacingPose } from './store/use-facing-pose'
|
|
1121
1101
|
export { default as useFenceCurveDraft } from './store/use-fence-curve-draft'
|
|
1122
|
-
export { type FirstPersonHudState, useFirstPersonHud } from './store/use-first-person-hud'
|
|
1123
1102
|
export { default as useFloorplanAnnotationVisibility } from './store/use-floorplan-annotation-visibility'
|
|
1124
1103
|
export { useFloorplanDraftPreview } from './store/use-floorplan-draft-preview'
|
|
1125
1104
|
export { default as useFloorplanMode } from './store/use-floorplan-mode'
|
|
1126
|
-
export { default as useFollowPascal } from './store/use-follow-pascal'
|
|
1127
1105
|
export {
|
|
1128
1106
|
default as useInteractionScope,
|
|
1129
1107
|
getEditingHole,
|
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
} from '@pascal-app/core'
|
|
11
11
|
import { buildGroundLevelChanges } from '@pascal-app/core/building'
|
|
12
12
|
import { useViewer } from '@pascal-app/viewer'
|
|
13
|
-
import { act, create } from '@react-three/test-renderer'
|
|
14
|
-
import useEditor from '../store/use-editor'
|
|
15
|
-
import villaAurelia from './__fixtures__/owner-villa-aurelia-basement.json'
|
|
16
13
|
import {
|
|
17
14
|
belowGradeShown,
|
|
18
15
|
followBelowGrade,
|
|
19
16
|
followGroundWindowBox,
|
|
20
17
|
gradeStandingShown,
|
|
21
18
|
groundWindowBoxShown,
|
|
22
|
-
} from '
|
|
19
|
+
} from '@pascal-app/viewer/ui'
|
|
20
|
+
import { act, create } from '@react-three/test-renderer'
|
|
21
|
+
import useEditor from '../store/use-editor'
|
|
22
|
+
import villaAurelia from './__fixtures__/owner-villa-aurelia-basement.json'
|
|
23
23
|
import { useEditorLevelDisplay } from './editor-level-display'
|
|
24
24
|
|
|
25
25
|
// The owner's villa (13 Oct), trimmed: its Lower Ground lies 3.35 m under the lawn.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { afterEach, expect, test } from 'bun:test'
|
|
2
|
-
import { cameraPoseStore, publishCameraPose } from '
|
|
2
|
+
import { cameraPoseStore, publishCameraPose } from '@pascal-app/viewer/ui'
|
|
3
3
|
import { cameraFacingYaw } from './camera-facing'
|
|
4
4
|
|
|
5
5
|
afterEach(() => cameraPoseStore.setState({ pose: null }))
|
package/src/lib/camera-facing.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { cameraPoseStore } from '
|
|
2
|
-
import useEditor from '../store/use-editor'
|
|
1
|
+
import { cameraPoseStore, navigationSyncPoseStore } from '@pascal-app/viewer/ui'
|
|
3
2
|
import { getActiveBuildingPose } from './world-grid-snap'
|
|
4
3
|
|
|
5
4
|
const QUARTER_TURN = Math.PI / 2
|
|
@@ -12,7 +11,7 @@ const QUARTER_TURN = Math.PI / 2
|
|
|
12
11
|
*/
|
|
13
12
|
export function cameraFacingYaw(): number {
|
|
14
13
|
const pose = cameraPoseStore.getState().pose
|
|
15
|
-
let azimuth =
|
|
14
|
+
let azimuth = navigationSyncPoseStore.getState().pose?.azimuth ?? 0
|
|
16
15
|
if (pose) {
|
|
17
16
|
const dx = pose.position[0] - pose.target[0]
|
|
18
17
|
const dz = pose.position[2] - pose.target[2]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useViewer } from '@pascal-app/viewer'
|
|
2
|
+
import { useBelowGrade, useGroundWindowBox } from '@pascal-app/viewer/ui'
|
|
2
3
|
import { useEffect } from 'react'
|
|
3
4
|
import useEditor, { type CaptureMode } from '../store/use-editor'
|
|
4
|
-
import { useBelowGrade, useGroundWindowBox } from './below-grade'
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Whether the editor shows every level. Preview and the walkthrough show the
|
|
@@ -19,6 +19,8 @@ import {
|
|
|
19
19
|
useScene,
|
|
20
20
|
ZoneNode,
|
|
21
21
|
} from '@pascal-app/core'
|
|
22
|
+
import type { RoomSelectionRecord } from '@pascal-app/viewer/ui'
|
|
23
|
+
import { resolveRoomAssemblyHeights } from '@pascal-app/viewer/ui'
|
|
22
24
|
import { moveTogetherLabel } from '../components/ui/panels/floor-foundation-panel'
|
|
23
25
|
import {
|
|
24
26
|
applyFloorFoundation,
|
|
@@ -35,7 +37,6 @@ import {
|
|
|
35
37
|
roomFootprint,
|
|
36
38
|
roomOwnedPlateDrillTarget,
|
|
37
39
|
} from './floor-footprints'
|
|
38
|
-
import { resolveRoomAssemblyHeights } from './room-assembly-overlay'
|
|
39
40
|
import { roomConstructionState } from './room-construction'
|
|
40
41
|
import {
|
|
41
42
|
addRoomConstruction,
|
|
@@ -43,7 +44,6 @@ import {
|
|
|
43
44
|
roomRelativeFloorHeight,
|
|
44
45
|
setRoomRelativeFloorHeight,
|
|
45
46
|
} from './room-construction-commands'
|
|
46
|
-
import type { RoomSelectionRecord } from './room-selection'
|
|
47
47
|
import { applyRoomPlan } from './room-structure-commands'
|
|
48
48
|
|
|
49
49
|
const LEVEL = 'level_footprints'
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
useScene,
|
|
14
14
|
} from '@pascal-app/core'
|
|
15
15
|
import { useViewer } from '@pascal-app/viewer'
|
|
16
|
+
import { resolveRoomAssemblyHeights } from '@pascal-app/viewer/ui'
|
|
16
17
|
import { create } from 'zustand'
|
|
17
18
|
import { getRoomSelectionIndex } from '../hooks/use-selected-room'
|
|
18
19
|
import useEditor from '../store/use-editor'
|
|
@@ -31,7 +32,6 @@ import {
|
|
|
31
32
|
} from './floor-region-session'
|
|
32
33
|
import { type FloorRegionPoint, floorRegionSnapTargets } from './floor-region-snap'
|
|
33
34
|
import { beginGesture, type GestureHandle } from './gesture-lifecycle'
|
|
34
|
-
import { resolveRoomAssemblyHeights } from './room-assembly-overlay'
|
|
35
35
|
import { sfxEmitter } from './sfx-bus'
|
|
36
36
|
|
|
37
37
|
// "Cut opening": draws an opening on a room's floor (or its ceiling) with the
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { describe, expect, test } from 'bun:test'
|
|
2
2
|
import type { FloorplanGeometry } from '@pascal-app/core'
|
|
3
|
+
import { floorplanGeometryMetadata, withFloorplanGeometryMetadata } from '@pascal-app/core'
|
|
3
4
|
import {
|
|
4
5
|
DEFAULT_FLOORPLAN_ANNOTATION_VISIBILITY,
|
|
5
6
|
filterFloorplanAnnotationGeometry,
|
|
6
7
|
normalizeFloorplanAnnotationVisibility,
|
|
7
8
|
} from './annotation-visibility'
|
|
8
|
-
import { floorplanGeometryMetadata, withFloorplanGeometryMetadata } from './floorplan-extension'
|
|
9
9
|
|
|
10
10
|
describe('floor-plan annotation visibility', () => {
|
|
11
11
|
test('fills missing persisted categories with visible defaults', () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FloorplanGeometry } from '@pascal-app/core'
|
|
2
|
-
import { type FloorplanAnnotationRole, readFloorplanGeometryMetadata } from '
|
|
2
|
+
import { type FloorplanAnnotationRole, readFloorplanGeometryMetadata } from '@pascal-app/core'
|
|
3
3
|
|
|
4
4
|
export type FloorplanAnnotationCategory =
|
|
5
5
|
| 'automaticDimensions'
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
type AnyNodeDefinition,
|
|
5
5
|
BuildingNode,
|
|
6
6
|
type FloorplanGeometry,
|
|
7
|
+
floorplanGeometryMetadata,
|
|
7
8
|
type GeometryContext,
|
|
8
9
|
LevelNode,
|
|
9
10
|
loadPlugin,
|
|
@@ -36,7 +37,6 @@ import {
|
|
|
36
37
|
resolveFloorplanScreenUnitsPerPixel,
|
|
37
38
|
rotateFloorplanExportBounds,
|
|
38
39
|
} from './floorplan-export'
|
|
39
|
-
import { floorplanGeometryMetadata } from './floorplan-extension'
|
|
40
40
|
import { FloorplanPdfDocument, loadFloorplanPdfFonts } from './floorplan-pdfkit-document'
|
|
41
41
|
import { renderFloorplanGeometryToPdfKit } from './floorplan-pdfkit-renderer'
|
|
42
42
|
|
|
@@ -4,23 +4,28 @@ import {
|
|
|
4
4
|
type AnyNode,
|
|
5
5
|
type AnyNodeId,
|
|
6
6
|
type ConstructionDrawingType,
|
|
7
|
+
FLOORPLAN_VIEW_ROTATION_DEG,
|
|
7
8
|
type FloorplanGeometry,
|
|
9
|
+
type FloorplanMetricNotation,
|
|
8
10
|
type FloorplanPalette,
|
|
9
11
|
type FloorplanPoint,
|
|
12
|
+
type FloorplanSchedule,
|
|
13
|
+
type FloorplanWallDimensionFaces,
|
|
10
14
|
getLevelDisplayName,
|
|
11
15
|
isNodeKindEnabled,
|
|
12
16
|
type LiveNodeOverrides,
|
|
13
17
|
type NodeCategory,
|
|
14
18
|
nodeRegistry,
|
|
19
|
+
readFloorplanGeometryMetadata,
|
|
15
20
|
resolveBuildingForLevel,
|
|
16
21
|
useScene,
|
|
17
22
|
} from '@pascal-app/core'
|
|
18
23
|
import { useViewer } from '@pascal-app/viewer'
|
|
24
|
+
import { FloorplanGeometryRenderer, navigationSyncPoseStore } from '@pascal-app/viewer/ui'
|
|
19
25
|
import { createElement } from 'react'
|
|
20
26
|
import { flushSync } from 'react-dom'
|
|
21
27
|
import { createRoot } from 'react-dom/client'
|
|
22
28
|
import { resolveSvgAnnotationCollisions } from '../../components/editor-2d/renderers/floorplan-annotation-layout'
|
|
23
|
-
import { FloorplanGeometryRenderer } from '../../components/editor-2d/renderers/floorplan-geometry-renderer'
|
|
24
29
|
import {
|
|
25
30
|
buildContext,
|
|
26
31
|
collectDirectFloorplanScopeNodes,
|
|
@@ -33,7 +38,6 @@ import {
|
|
|
33
38
|
splitFloorplanOverlay,
|
|
34
39
|
} from '../../components/editor-2d/renderers/floorplan-registry-layer'
|
|
35
40
|
import useDrawingView, { DRAWING_TYPE_OPTIONS } from '../../store/use-drawing-view'
|
|
36
|
-
import useEditor from '../../store/use-editor'
|
|
37
41
|
import useFloorplanAnnotationVisibility from '../../store/use-floorplan-annotation-visibility'
|
|
38
42
|
import useFloorplanMode from '../../store/use-floorplan-mode'
|
|
39
43
|
import {
|
|
@@ -41,17 +45,10 @@ import {
|
|
|
41
45
|
filterFloorplanAnnotationGeometry,
|
|
42
46
|
} from './annotation-visibility'
|
|
43
47
|
import { resolveNodeForDrawingType } from './drawing-coordination'
|
|
44
|
-
import {
|
|
45
|
-
type FloorplanMetricNotation,
|
|
46
|
-
type FloorplanSchedule,
|
|
47
|
-
type FloorplanWallDimensionFaces,
|
|
48
|
-
getFloorplanNodeExtension,
|
|
49
|
-
readFloorplanGeometryMetadata,
|
|
50
|
-
} from './floorplan-extension'
|
|
48
|
+
import { getFloorplanNodeExtension } from './floorplan-extension'
|
|
51
49
|
import { type FloorplanMode, resolveFloorplanAnnotationVisibility } from './floorplan-mode'
|
|
52
50
|
import { createFloorplanPdfDocument, type FloorplanPdfDocument } from './floorplan-pdfkit-document'
|
|
53
51
|
import { renderFloorplanGeometryToPdfKit } from './floorplan-pdfkit-renderer'
|
|
54
|
-
import { FLOORPLAN_VIEW_ROTATION_DEG } from './geometry'
|
|
55
52
|
|
|
56
53
|
/**
|
|
57
54
|
* Floorplan PDF export.
|
|
@@ -193,7 +190,7 @@ export async function exportFloorplanPdf(scope: FloorplanExportScope): Promise<v
|
|
|
193
190
|
expertAnnotationState.visibility,
|
|
194
191
|
expertAnnotationState.showDimensions,
|
|
195
192
|
)
|
|
196
|
-
const navigationAzimuth =
|
|
193
|
+
const navigationAzimuth = navigationSyncPoseStore.getState().pose?.azimuth
|
|
197
194
|
const drawingType = useDrawingView.getState().drawingType
|
|
198
195
|
const annotationLayoutOverrides = useDrawingView.getState().annotationLayoutOverrides
|
|
199
196
|
const drawingLabel =
|