Skip to content

Subpath exports for filters + widgets; build tooling#368

Merged
CarlosNZ merged 17 commits into
v2.0-devfrom
modify-package-paths
Jun 16, 2026
Merged

Subpath exports for filters + widgets; build tooling#368
CarlosNZ merged 17 commits into
v2.0-devfrom
modify-package-paths

Conversation

@CarlosNZ

Copy link
Copy Markdown
Owner

Reorganises two public-API surfaces onto their own subpaths, plus minor build/demo tweaks.

  • @json-edit-react/utils/filters — the filter toolkit moves off the package root so its generic builder names (and, or, not, root, …) don't crowd it.
  • @json-edit-react/components/widgets — the editor-slot widgets (ReactSelect, CodeEditor) move off the root; they replace JsonEditor's Select/TextEditor controls rather than render a node type, so the root barrel stays uniformly custom-node definitions.

Each subpath is wired in three places: package exports (+ typesVersions fallback), a second rollup jsBundle/dtsBundle pair, and the demo's Vite alias.

Also:

  • Root build-all script (pnpm -r build).
  • Demo build mode reads core's raw build/ instead of the build_package/ publish-staging dir.
  • Fix the demo's CodeEditor under build/pack mode by deduping @codemirror/state / @codemirror/view (same mechanism as the existing react dedupe).
  • Fix stale datavalue destructure in three demo custom-component displays.

Tests green (618), demo typechecks clean.

CarlosNZ and others added 17 commits June 16, 2026 14:48
Resolves the stacked-PR squash cascade: #367 (the filter toolkit) landed on
v2.0-dev as a squash, conflicting with this branch's copy of the same work.
Kept this branch's evolution (filters moved to the /filters subpath,
custom-component data→value fix) and pulled in the two late-#367 doc edits
that weren't here yet (filters/README live-demo link, _glob.ts glob-rules
comment).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Bundle size impact

@json-edit-react/components

Format Base raw PR raw Δ raw Base gzip PR gzip Δ gzip
esm 13.74 KB 12.24 KB 🟢 -1.50 KB (-10.91%) 4.67 KB 4.14 KB 🟢 -534 B (-11.18%)
cjs 14.44 KB 12.89 KB 🟢 -1.55 KB (-10.71%) 4.53 KB 4.02 KB 🟢 -525 B (-11.32%)

@json-edit-react/utils

Format Base raw PR raw Δ raw Base gzip PR gzip Δ gzip
esm 6.37 KB 3.37 KB 🟢 -3.00 KB (-47.15%) 2.69 KB 1.49 KB 🟢 -1.20 KB (-44.66%)
cjs 6.54 KB 3.46 KB 🟢 -3.08 KB (-47.10%) 2.66 KB 1.47 KB 🟢 -1.18 KB (-44.55%)

Measured from build/index.{cjs,esm}.js. Gzip at level 9.

@CarlosNZ CarlosNZ merged commit d1c5297 into v2.0-dev Jun 16, 2026
2 checks passed
@CarlosNZ CarlosNZ deleted the modify-package-paths branch June 16, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant