Repository navigation
refactor: consolidate runtime adapters, split dist chunks, and deduplicate core/scene clones - #95
Merged
Merged
Conversation
…st chunk splitting
…s, and prune dead code
…nce, and CI hygiene
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates duplicated runtime adapter logic, core algorithms, and build output across
@layoutit/polycss,@layoutit/polycss-core,@layoutit/polycss-react,@layoutit/polycss-vue,bench/, andwebsite/(-2,225 net lines across 115 files vsmain, andpackages/polycss/distJS reduced from 700.0 KB to 201.4 KB via chunk splitting).Key changes
@layoutit/polycss/runtime):TransformControls(with per-handleTransformGizmoCachememoization and livegetStatedrag callbacks) andSelectonto shared runtime engines (gizmoEngine.ts,selectionEngine.ts).cameraSnapshotAttrs.ts), DOM mesh registry & pointer event synthesis (meshHitTest.ts), standalone mesh mounting (standaloneMesh.ts), and<Poly>leaf descriptors (polyLeafDescriptor.ts).tsupchunk splitting (splitting: true) inpackages/polycss/tsup.config.tswhile retaining all 368@layoutit/polycss-corere-exports indist/index.jsand keepingcustomElements.defineisolated todist/elements.js.packages/polycss/src/api/createPolyScene.ts(1,387 -> 320 lines) intoapi/scene/renderEntry.tsandapi/scene/meshEntry.ts.packages/core/src/cull/bvh.ts), shared Orbit/Map pointer controls (pointerControlsCore.ts,PolyPointerControlsElement.ts), shared core vector/merge/color/iframe/Three-camera helpers, shared custom-element camera wrapper (cameraWrapper.ts), and shared bench math (bench/math.mjs).packages/polycss,packages/fonts, andwebsite/.<PolySelect>single-click toggle-off (shallowRefinstead ofreactiveProxy identity mismatch; updatedpackages/vue/src/select/Select.test.ts), added non-Element click guard (target?.closest?.), aligned Reactapi.hasto live controller state, and made duplicateadd()in multi-select a no-op.-webkit-*camelCase slicing incssPropToCamel(prop.slice(7)).morphregistry-dependency compatibility verification tocheck-packs.mjs.bench/renderer-ir-conformance.test.mjs.MutationObserverzero-churn orbit tests to React and VueTransformControlstest suites.Verification
pnpm map && pnpm verify(all guards, unit tests, builds, typecheck, IR conformance, packs, bench, and examples)pnpm test:coverage(all 8 workspace packages)pnpm --filter @layoutit/polycss-website build && test:domformat-tools && verify:domformat(23 pages, 304 Gallery models)pnpm bench:gate:lifecycle(13/13)pnpm bench:gate:ci -- --base-ref main(55/55 across Chromium and Firefox)pnpm bench:gate:perf -- --base-ref main(9/9)