Skip to content

Feat/UI lib v2#27

Open
matej21 wants to merge 14 commits intomainfrom
feat/ui-lib-v2
Open

Feat/UI lib v2#27
matej21 wants to merge 14 commits intomainfrom
feat/ui-lib-v2

Conversation

@matej21
Copy link
Copy Markdown
Member

@matej21 matej21 commented May 7, 2026

No description provided.

matej21 and others added 14 commits May 7, 2026 18:10
Enable selective component overrides by replacing relative cross-component
imports with #bindx-ui/ subpath imports. A Vite plugin can intercept these
at build time to resolve local overrides or fall back to package defaults.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…omponent overrides

- Vite plugin intercepts #bindx-ui/ imports, resolves local overrides
  from user's src/ui/ directory, falls back to package defaults
- CLI tool (bindx-ui eject/restore/status/diff) for managing overrides
  with metadata tracking and version-aware status checks
- BindxUIDefaultsProvider context for global component default props
  with nested provider merging support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…y, and defaults context

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The _internal/* package export didn't work because wildcard patterns
don't auto-resolve extensions. Instead, the plugin now resolves
fallback paths directly to source files in the package directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a local Button override with border-red-500 to the example app
and verifies that package components (PersistButton) pick up the
override through the #bindx-ui/ import resolution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ompt

- backport command: retrieves base source via git refs, performs diff3
  three-way merge, handles fast paths (no changes, auto-update, etc.)
- --agent flag: generates structured prompt for AI-assisted merge
- --sync flag: updates metadata after agent completes merge
- diff upstream/local sub-commands: show targeted diffs against base
- Enhanced status: distinguishes upstream-only vs both-changed vs local-only
- Git helpers: store gitRef/gitPath in metadata at eject time
- Fix stale test assertions from component restructure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- backport --agent --all: auto-updates unmodified components, generates
  batch summary prompt for merge-needed ones (inline if ≤5, summary if more)
- backport --skip: acknowledges upstream changes without merging, updates
  base ref so future backports use current upstream as new base
- Handle edge cases: upstream removed, local file missing, shallow clone,
  missing git ref — all reported in batch summary

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…owser test

The test was waiting for the container div (datagrid-example) which renders
immediately, then asserting datagrid-table exists — but that element only
appears after data loads inside DataViewNonEmpty. On slower CI, this races.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…shared CLI utils

- Replace execSync with execFileSync in git.ts, diff.ts, merge.ts, backport.ts
  to prevent shell injection via user-editable .bindx-ui.json metadata
- Update metadata after writing conflict markers in backport to prevent
  re-merging conflict content on subsequent runs
- Track metadata changes with a flag in backportAll to save when
  localHash === upstreamHash (not only when auto-updates occur)
- Extract hashContent, stripHeader, isExecError into shared utils.ts
- Skip findDependents for glob ejections where the pattern can't match imports

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The cli-registry test expected `form/input-field` and
`datagrid/columns/text-column` to exist as discoverable components, but
those paths only exist after the one-component-per-file restructure,
which was deferred. Keep the broader assertions (button, container,
select-field) that hold on the current structure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bun's package.json imports field doesn't iterate array fallbacks (only
the first candidate is tried), so a single "#bindx-ui/*": "./src/*"
pattern can't cover both .tsx and .ts files. Split into two patterns:

- #bindx-ui/*/index → .ts (folder index re-exports stay as plain TS)
- #bindx-ui/*       → .tsx (everything else)

Rename the five .ts files reachable via #bindx-ui/ to .tsx so the
single non-array pattern resolves them. .ts is now reserved for files
not exposed via the subpath prefix (cli/, vite-plugin.ts).

Without this, transitive imports of bindx-ui from outside the package
(e.g. tests/react/dataview/dataGridEnumColumnUi.test.tsx) failed to
load at runtime even though typecheck passed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Replace dead "vite build" script (no vite.config.ts existed) with
  "bun build" that bundles src/cli/cli.ts to dist/cli/cli.js for the
  bin entry — single Node-runnable file, no extra devdep.
- chmod +x ensures the bundled CLI is executable for local dev/link.
  npm install handles bin permissions automatically on user installs.
- tsc --build still emits .d.ts to dist/types/ for declarations.
- Add "files" so the published tarball ships only dist + src and skips
  tests/configs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each component lives in its own file so users can eject one without
pulling in unrelated siblings. Adapted from the original branch's
restructure, but rejects all the public-API renames so this commit is
purely additive — no breaking changes.

Splits:
- ui/: extract CheckboxInput, RadioInput, SheetLayout
- form/: split inputs.tsx into individual *-field.tsx files
- select/: split ui.tsx into input-ui, multi-select-ui, popover-ui
- datagrid/: columns.tsx → columns/ subfolder, cells.tsx → cells/,
  ui.tsx → ui/
- upload/: progress states, abort/dismiss buttons, metadata by media type
- repeater/: split block-repeater into item, sortable, ui, add-button

Old names preserved (vs. the original branch which renamed):
- DefaultDataGrid (not DataGrid), DefaultHasManyDataGrid
- DefaultRepeater (not Repeater), DefaultBlockRepeater
- DataGridTextColumn (not TextColumn), DataGridEnumColumn, etc.
- DataGridEnumCell (not EnumCell), DataGridHasOneCell, etc.
- DefaultDataGridLayout, DefaultSelectDataView

Renames in the original commit collided with @contember/bindx-dataview
and @contember/bindx-repeater which already export DataGrid, Repeater,
BlockRepeater. Keeping the Default*/DataGrid* prefixes preserves the
distinction.

Also pulls in the de05907 enum cell label fix from main into the new
columns/enum-column.tsx so DataGridEnumColumn renders labels from
options/enumName instead of raw values.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reverts the assertion-loosening from b02ab4f now that the file split
landed: form/input-field and datagrid/columns/text-column exist again
as standalone files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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