Commit Graph
5 Commits
Author SHA1 Message Date
minsungandClaude Opus 5.5 aaa0972bc1 feat(ui): rebuild the viewer UI with HMDesign components
New React UI around the unchanged engine (#1). GNB_ONLY page:

- AppHeader: GNB + GNBBrand; sample drawings in GNBNav (NavigationMenu)
  and GNBMobileMenu (same data, real ?model= links); file open and
  about/notice in GNBUtilities.
- DwgViewerCanvas: useRef/useEffect wrapper. new Viewer2D(host) on
  mount, option props diffed and pushed through the engine setters,
  onSelect/onPointerWorld/onViewChange forwarded to React. Viewer2D has
  no dispose(), so teardown stops the rAF loop / WebGL context from
  outside (also needed for StrictMode double mount).
- ViewerToolbar: Model/Layout ToggleGroup (sample's visibility rule),
  Fit, 2.5D and canvas-theme Toggles, window Toggles.
- FloatingPanel: HM Card in a fixed frame; drag/collapse via the ported
  makePanelDraggableAndCollapsible, CSS resize.
- LayersPanel (FilterBar search, Switch per layer, show/hide all via
  LayerPanelManager), PropertiesPanel (formatEntityProperties → Badge +
  Table, zoom to selection), OptionsPanel (Switch/Slider/Input, IndexedDB
  through optionsStore, reset).
- Load feedback per HMDesign: Progress for the measurable part
  (download bytes, stage steps) and LoadingScreen for the blocking
  WASM parse / Viewer2D.load(), painted before each blocking stage.
- StatusBar with status line, zoom %, live CAD coordinates in the
  bottom-right corner; AboutDialog keeps the acadrust MPL-2.0 notice,
  THIRD-PARTY-NOTICES and the local patch reachable.
- Drag & drop, ?model= auto-load, F shortcut, ResizeObserver resync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:49:33 +09:00
minsungandClaude Opus 5.5 40befda905 chore: keep the acadrust patch byte-exact in checkouts
Mark *.patch as -text so core.autocrlf never rewrites the served MPL-2.0
source patch (#1); `patch -p1` needs the original LF bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:49:32 +09:00
minsungandClaude Opus 5.5 bc8875770b feat(engine): port the viewer engine and panel logic unchanged
Copy the vanilla engine from dwg-dxf-viewer-sample verbatim (#1):

- src/engine/viewer2d/* (Viewer2D.js incl. the 2.5D view, parsers,
  acadrust-dwg WASM, cadSpaces, slugText, linParser/linData,
  fixDwgKoreanText, ...)
- src/engine/{layerPanel,panelUtils,propertyInspector,optionsStore}.ts

The relative layout is kept (engine/viewer2d next to the panel files),
so not even import paths changed; `diff -r --strip-trailing-cr` against
the sample is empty. public/ (NanumGothic, samples, licenses, module
map) is copied as is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:48:56 +09:00
minsungandClaude Opus 5.5 948021c7ac chore: scaffold Vite + React 19 + Tailwind v4 app on HMDesign
Start the React rebuild of the DWG/DXF viewer (#1).

- HMDesign is a git submodule (vendor/HMDesign, main) and its
  packages/ui is an npm workspace, so @hm-design/ui resolves to the
  submodule and shares this repo's node_modules.
- scripts/setup-hmdesign.mjs (postinstall) builds the package dist and
  points vendor/HMDesign/node_modules at ours with a junction, because
  HMDesign's build script reads typescript/shadcn from its own root.
  Nothing inside the submodule is modified.
- Versions follow HMDesign (react 19.3.0, vite 8.3.0, tailwindcss
  4.3.3, typescript 7.0.2) and the sample (three 0.185.1, dxf-parser
  1.1.2, opentype.js 2.0.0).
- CSS entry: tailwindcss + @hm-design/ui/tailwind.css (index.css).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:48:53 +09:00
kimminsung 1fd0b00df3 Initial commit 2026-10-12 16:59:42 +09:00