Skip to content

Add clip child offsets and native carousel demo#6

Closed
rauhryan wants to merge 4 commits intothefrontside:mainfrom
rauhryan:rr/carousel-native-demo
Closed

Add clip child offsets and native carousel demo#6
rauhryan wants to merge 4 commits intothefrontside:mainfrom
rauhryan:rr/carousel-native-demo

Conversation

@rauhryan
Copy link
Copy Markdown

@rauhryan rauhryan commented Apr 4, 2026

Summary

  • expose clip.childOffset through the TypeScript ops layer, validator, and WASM bridge so clipped containers can translate their children
  • add a regression test for horizontal child offsets and keep the worktree build using the Homebrew LLVM toolchain
  • add a native carousel demo that animates a 4:3 framed slide track with proper left and right transitions using the new clipping support

Testing

  • make && deno test --allow-read test/term.test.ts test/pointer.test.ts
  • deno check carousel-demo/main.ts
  • script -q /dev/null env CLAYTERM_SMOKE_TEST=1 deno run -A carousel-demo/main.ts

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 8, 2026

Open in StackBlitz

npm i https://pkg.pr.new/clayterm@6

commit: 3d20b74

Copy link
Copy Markdown
Member

@cowboyd cowboyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Seems like there is a formatting error

Comment on lines -1 to +4
CC = clang
LLVM_CLANG := $(shell if [ -x /opt/homebrew/opt/llvm/bin/clang ]; then printf %s /opt/homebrew/opt/llvm/bin/clang; elif [ -x /opt/homebrew/bin/clang ]; then printf %s /opt/homebrew/bin/clang; else command -v clang; fi)
CC = $(LLVM_CLANG)
LLVM_BIN_DIR := $(shell dirname "$(LLVM_CLANG)")
WASM_LD_DIR ?= $(shell if command -v wasm-ld >/dev/null 2>&1; then dirname "$$(command -v wasm-ld)"; elif [ -x /opt/homebrew/bin/wasm-ld ]; then printf %s /opt/homebrew/bin; fi)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

Comment on lines -22 to +25
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC)
PATH="$(LLVM_BIN_DIR):$(WASM_LD_DIR):$$PATH" $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is whack here, let's figure it out.

Comment on lines +77 to +80
childOffset: Type.Optional(Type.Object({
x: Type.Optional(Type.Number()),
y: Type.Optional(Type.Number()),
})),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are x,y allowed to be negative?

@rauhryan
Copy link
Copy Markdown
Author

Superseded by a clean PR that separates the core changes from demos. The clip childOffset work, floating parameter expansion, transition support, and element bounds API are now in separate, focused commits.

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.

2 participants