Repository navigation
Conversation
A build that defines __ASTRYX_TOUCH__ as false presents every component the pointer way and leaves out each touch layer imported through the guard touchLayers.ts documents. Without the define nothing changes. The browser support guide covers the build settings, device routing and the Next.js caveat.
…aved draft The section's last sentence ended on "saves", which matches "saved" in the main searcher's "toast notice for a saved draft" query. The section took the 20th result from a shorter doc and grew that answer past the lexical ranker's, which the main searcher's byte check rejects. The sentence now ends on "is worth"; a guard test pins that the guide is found for its own topic and not for that query.
…ind it through one internal hook @astryxdesign/core/touch-support exports TouchSupport: install() (idempotent, a no-op on the server, adds no listeners) and isInstalled(), nothing else. The module (main's gesture core; the animator joins it) sits in one module-level registry that components read only through the internal useTouchSupport hook, null on the server and until installed. Lint keeps the internals to Core and Lab, and the exports map holds only the public entry. A bundle test pins that core's root, hooks and utils entries and a component reading the hook carry none of the module, and that an install carries it. Replaces this branch's __ASTRYX_TOUCH__ define, resolver change and guide section, which the install makes unnecessary.
CI-Rerun: one RTL story navigation timed out in pr-rtl (core 2/3) of run 40273227303; it does not reproduce at this tree.
…ere a coarse pointer is present install() registers the module now where some input is a coarse pointer (any-pointer: coarse), and otherwise waits on that query's change event, registering once a coarse pointer appears (a tablet attached to a laptop), so a page used only with a mouse registers nothing. isInstalled() reports whether install() ran. The doc comment says layout and presence motion works without it. Tests cover a fine-pointer page and one that gains a coarse pointer later.
…sture core Core's root, hooks and utils entries are checked to carry none of the touch module (touch-support/touchModule.ts) until an app installs TouchSupport: an entry that imports the module, directly or through TouchSupport, still fails. Whether an entry carries the gesture core itself is a separate check, held until components have moved onto the module, so this check does not fail a component that still imports a recognizer directly. Glue on useTouchSupport is still checked to carry neither the module nor the gesture core.
CI-Rerun: Vercel's deployment of 1a0c61d failed on Vercel's side; that head changed only a test file, and the branches pushed in the same second deployed.
The module holds the gesture core and no component uses it yet; the module's code ships with the entry, so a page that imports it sends that code to every visitor, and only registration waits for a coarse pointer. The doc no longer promises an animator, components' touch behavior or Reduce Motion handling, which arrive in later releases.
…ntry @astryxdesign/core/internal/touch exports useTouchSupport and the touch module's type, so a Lab component reaches the module the way a Core component does. Like every internal entry, it is undocumented, outside the public API, and allowed by lint only in Core and Lab, which now refuses @astryxdesign/core/internal/* elsewhere in place of the old touch-support/* ban. sync-exports lists it with the other file subpaths. A component that reads the module through it still carries none of the gesture core.
…install step The touch and gesture module is one shared internal module that Core components import directly and Lab components reach through @astryxdesign/core/internal/touch; a bundler keeps one copy per page. The public touch-support entry, TouchSupport.install() and isInstalled(), the registry and useTouchSupport go away. Importing the module attaches no listeners, so a page with only a fine pointer runs none. Tests: two components importing it share one copy in a split bundle, and the module loads without listeners.
…presentation and motion through internal entries @astryxdesign/core/internal/touch now also re-exports PanGestureRecognizer, the gesture types and the touch presentation queries, and the new @astryxdesign/core/internal/motion re-exports the animator, the bezier and spring math, the rubber band and the UIKit tuning tables: the modules on main that Lab components import today by unexported paths. Named re-exports only, so a component ships only what it imports. A guard test fails a Lab import of a covered module that does not go through an internal entry.
Core is about to export a few undocumented modules under `@astryxdesign/core/internal/<name>`, so Lab can build on machinery with no public API of its own (the reorder engine behind createReorderable first). They are reserved for Astryx's own packages and sit outside the compatibility promise (spec:AST-017 FR21). A new rule, @astryx/no-core-internal-import, reports any import, re-export or dynamic import of `@astryxdesign/core/internal` or a path under it. The repo config turns it on for every file outside packages/core and packages/lab. It is a custom rule rather than a repo-wide `no-restricted-imports` block, because flat config overrides a same-named rule per file and would undo the layer blocks that already use it. The plugin README records the convention each internal subpath follows: an explicit `./internal/<name>` exports entry, never a wildcard, and a header saying it is reserved, undocumented and outside the promise. Lint-only; nothing ships, so no changeset.
The previous commit's formatter pass reflowed three unrelated selectors.
The previous commit emptied the file by mistake. This puts back main's config with only the internal-subpath block added.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
…rule Core's internal subpaths share one convention (meta#8561): an explicit ./internal/<name> exports entry, a header saying it is reserved for Astryx's own packages, undocumented and outside the compatibility promise (spec:AST-017 FR21), and the custom @astryx/no-core-internal-import rule for files outside Core and Lab. This drops the touch module's own repo-wide no-restricted-imports block, which flat config would let override the layer blocks that already use that rule, and points the entry's header and the lint test at the shared rule. Co-authored-by: Christopher Chedeau <vjeuxx@gmail.com>
…ort(); README settles the layout
From review: the rule missed `require('@astryxdesign/core/internal/…')`
(the config applies it to .cjs) and TypeScript's
`typeof import('@astryxdesign/core/internal/…')`; both are reported now,
with a test each, and the tests parse with typescript-eslint.
The README describes one layout: an internal subpath is a single file,
`packages/core/src/internal/<name>.ts`, with an explicit
`./internal/<name>` exports entry listed in scripts/sync-exports.js's
STATIC_EXPORTS, and no longer names a module that does not exist yet.
…ule subpaths, as internal/touch is
|
Posted by Cindy's agent on her behalf. Thanks, this matches Cindy's decision that Lab may use Core's internals through |
…b31dd) as PageControl's dependency base
…uikit/c23-page-control-scrub
|
A correction to the note above: the internal entry points no longer ship in #8076. Under the maintainers' rule that internal code lands with its first user, they move to the first Lab component that uses them. |
Review only this PR's change: vjeux/astryx@39ed04d...cd3ad72 (on main).
Why
A Lab component's registry build fails once it installs Core: Lab imports Core's pan recognizer, gesture types, touch presentation queries and motion modules through paths that resolve inside the repository but not from Core's published entries. The
registry-contract (preview)check on the pull-to-refresh pull requests shows it.What led to it
This comes from the work to make Astryx's touch components behave as native iOS ones do (sheets, menus, gestures and their motion). The touch-model decision on #8465: "Lab components reach the same modules through Core's internal subpaths (
@astryxdesign/core/internal/touchand similar)". These entries are undocumented, outside the compatibility promise, and allowed by lint only in Core and Lab (architecture:react-component-runtimeINV13).Options and tradeoffs
Why this choice
The decision on #8465 picks internal entries. Named re-exports keep each component's bundle to what it imports, and a tuning table to the rows it reads (
architecture:component-style-authoringINV6).What changes
@astryxdesign/core/internal/touchalso re-exports the pan recognizer, the gesture types, the default environment, and the touch presentation queries and hooks.@astryxdesign/core/internal/motionre-exports the animator, the bezier and spring math, the rubber band and the UIKit tuning tables.scripts/sync-exports.js; modules not yet on main join as their pull requests land.resolveSnapPointstays internal to the public entries.How to check it
@astryxdesign/core/internal/touchand the animator from@astryxdesign/core/internal/motion: both resolve.Evidence
resolveSnapPointexport test: public entries only, andinternal/motionre-exports noresolveSnapPoint.Scope