Skip to content

Debug config validate#238

Open
ameerf-wix wants to merge 41 commits into
masterfrom
debug_config_validate
Open

Debug config validate#238
ameerf-wix wants to merge 41 commits into
masterfrom
debug_config_validate

Conversation

@ameerf-wix

Copy link
Copy Markdown
Contributor

Description

Related Issue

Checklist

  • I have read the Contributing Guide
  • I have added/updated tests for my changes (if applicable)
  • I have updated documentation/rules/skills (if applicable)

Screenshots / Demos

Additional Notes

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Generated llms.txt preview

llms.txt
# @wix/interact

> Declarative, configuration-driven interaction library — web-native, AI-ready, and framework-agnostic.

- Install: `npm install @wix/interact @wix/motion-presets`
- Three entry points: vanilla JS (`@wix/interact`), React (`@wix/interact/react`), Web Components (`@wix/interact/web`)
- Five trigger types: hover, click, viewEnter, viewProgress, pointerMove
- Effects via named presets (`@wix/motion-presets`), keyframes, CSS transitions, or custom JS callbacks
- Configs are JSON-serializable -- designed for LLM generation

## Docs

- [Full Reference](https://wix.github.io/interact/rules/full-lean.md): Declarative configuration-driven interaction library. Binds animations to triggers via JSON config. (700 lines)
- [Integration Guide](https://wix.github.io/interact/rules/integration.md): Rules for integrating `@wix/interact` into a webpage — binding animations and effects to user-driven triggers via declarative configuration. (334 lines)
- [Validation Guide](https://wix.github.io/interact/rules/validate.md): Rules for using `@wix/interact-validate` — validate an `InteractConfig` before it reaches the runtime. (271 lines)

## Optional

- [Click Trigger Rules for @wix/interact](https://wix.github.io/interact/rules/click.md): This document contains rules for generating click-triggered interactions in `@wix/interact`. (189 lines)
- [Hover Trigger Rules for @wix/interact](https://wix.github.io/interact/rules/hover.md): This document contains rules for generating hover-triggered interactions in `@wix/interact`. (191 lines)
- [PointerMove Trigger Rules for @wix/interact](https://wix.github.io/interact/rules/pointermove.md): These rules help generate pointer-driven interactions using `@wix/interact`. (279 lines)
- [ViewEnter Trigger Rules for @wix/interact](https://wix.github.io/interact/rules/viewenter.md): This document contains rules for generating interactions that respond to elements entering the viewport using the `@wix/interact`. (226 lines)
- [ViewProgress Trigger Rules for @wix/interact](https://wix.github.io/interact/rules/viewprogress.md): These rules help generate scroll-driven interactions using `@wix/interact`. (196 lines)
- [All rules in one file](https://wix.github.io/interact/llms-full.txt): Complete concatenation (2386 lines)
llms-full.txt header
# @wix/interact v2.4.0 -- AI Rules Reference
# https://wix.github.io/interact/llms.txt
# 8 files, 2386 lines

Download full files from workflow artifacts, or run node scripts/generate-llms.mjs locally.

@ydaniv

ydaniv commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

I think it's important we don't build that as part of the library.
It adds dependencies, and it will add bloat. We can't count on users just picking what they need and tree-shake it.
Usually users will import from CDN, or just import the library as-is.
And also tools that check the build size will show a much larger size which reflects bad visually.

@ameerf-wix ameerf-wix marked this pull request as ready for review June 18, 2026 12:52
Comment thread packages/interact-validate/vite.config.ts
Comment thread packages/interact-validate/package.json Outdated
Comment thread packages/interact-validate/src/schema/interactions.ts
Comment on lines +85 to +86
trigger: z.enum(['viewEnter', 'pageVisible']),
params: ViewEnterParams.optional(),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

pageVisible, besides being Wix-only, is a wrapper above viewEnter + triggerType: 'state', which is now on the effect. It's becoming somewhat problematic to keep.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh I missed it because it is not really documented anywhere that it must have triggerType: 'state' - I guess that it is another strong indication to remove it. Maybe we can also make sure that wix do the transformation from pageVisible to viewEnter + triggerType: 'state' and pass a valid config to Interact

Comment thread scripts/generate-llms.mjs
Comment thread packages/interact-validate/src/index.ts Outdated
Comment thread packages/interact-validate/src/index.ts Outdated
result.sort((a, b) => {
const pa = a.path.join('\0');
const pb = b.path.join('\0');
return pa < pb ? -1 : pa > pb ? 1 : 0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What are we comparing here? Length of string? Or do these strings represent numbers?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it is lexical order on strings that represent paths in the config - does not seem ideal, should fix that

Comment thread packages/interact/rules/validate.md Outdated
Comment thread packages/interact-validate/README.md Outdated
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