Skip to content

Feature/schemadoc#19

Open
ronnorthrip wants to merge 78 commits into
mainfrom
feature/schemadoc
Open

Feature/schemadoc#19
ronnorthrip wants to merge 78 commits into
mainfrom
feature/schemadoc

Conversation

@ronnorthrip
Copy link
Copy Markdown
Collaborator

Schema docs generated by Claude based on alpineflow changes.
I reviewed the end result and it seems to be working fine.

zachiler and others added 30 commits April 14, 2026 14:46
Catches up WithWireFlow trait to match the v0.2.0-alpha AlpineFlow bridge
additions. Thin wrappers — each method dispatches a flow:* event that the
client-side wire-bridge translates to a canvas method call.

New particle firing methods:
- flowSendParticleAlongPath(path, options)  — arbitrary SVG path
- flowSendParticleBetween(source, target, options) — straight line
- flowSendParticleBurst(edgeId, options) — N particles with count/stagger
- flowSendConverging(edgeIds, options) — fan-in to targetNodeId

New tag-filtered bulk controls:
- flowCancelAll(filter, options) — stop mode: jump-end/rollback/freeze
- flowPauseAll(filter) — pause all matching animations
- flowResumeAll(filter) — resume all matching animations

Tests: new tests/Feature/WithWireFlowTest.php with a minimal Livewire
component harness. Each test calls the trait method and asserts the
dispatched event name + payload match the wire-bridge contract. Also
adds app.key config to TestCase — Livewire's view-rendering path requires
it, which was previously throwing MissingAppKeyException on any component
render test. All 35 wireflow tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bumps dist/alpineflow.bundle.esm.js to the AlpineFlow v0.2.0-alpha build
containing the full animation chapter — transactions, tagged groups,
while-predicate, direction state machine, physics motion, record/replay,
path-aware beam renderer with gradients — plus the wire-bridge additions
for the new server-callable surface.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- docs/animation/particles.md — new v0.2.0-alpha section covering the
  four new firing methods (AlongPath/Between/Burst/Converging), the beam
  renderer with gradients and follow-through, bulk control via
  flowCancelAll/Pause/Resume with tag filters, and the flowHighlightPath
  option-passthrough fix that now respects renderer/gradient/etc.
- docs/animation/basics.md — new Tagging section showing the common
  pattern: start ambient loops with tag, control as a group from other
  handlers.
- docs/migration/_index.md (new) — sidebar landing for the migration
  section (order: 99).
- docs/migration/v0.2.0-alpha.md (new) — full upgrade guide: lists the
  new trait methods, the flowHighlightPath fix, breaking changes inherited
  from AlpineFlow (cross-linked to AlpineFlow's migration guide for core
  behavior), and new AlpineFlow capabilities now reachable from PHP via
  existing flowAnimate options (physics motion, tags, startAt). Closes
  with "not yet reachable" list (transactions, groups, handle-level
  controls, record/replay) flagging future work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Timeline is client-only. Server-side orchestration today is staggered
flowAnimate() calls + tag for group cancel. Tracked for a future release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- trait.md: add the 7 new methods to the Update & Animation table
  (flowSendParticleAlongPath/Between/Burst, flowSendConverging,
  flowCancelAll/PauseAll/ResumeAll)
- convenience.md: broaden flowHighlightPath option description and add
  a beam + gradient example demonstrating the pass-through fix

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

docs: update server reference for v0.2.0-alpha additions
Bundles the updated AlpineFlow dist (Tier A — measurement & layout
lifecycle). No new WireFlow-side API surface: trait methods, <x-flow>
component, and wire-bridge dispatches are all unchanged. Tier A behavior
surfaces entirely on the client side when consumers re-run
wireflow:install --force.

Adds migration guide at docs/migration/v0.2.1-alpha.md covering:
- What WireFlow users get automatically (ResizeObserver-driven sizing,
  reactive childLayout, canvas.batch)
- New FlowNode properties (fixedDimensions, resizeObserver, min/max)
- Alpha-breaking behavior inherited from AlpineFlow (leaf height rule,
  auto-promotion on animate/resize/compute, frame-aligned dedup,
  client-local dimensions)
- Installation steps

Cross-references the AlpineFlow migration guide for the complete
technical rationale rather than duplicating content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pulls the updated AlpineFlow dist containing the six Tier B API
improvements: text-align CSS move, node-element accessors, enhanced
drop zone (MIME + deepest-container + getNodeAtPoint), .flow-node-
dragging class, defaultEdgeType config, edge class → label forwarding.

No WireFlow-side API changes. Migration guide updated with short
summaries of each B-item.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: sync with AlpineFlow Tier B (B1–B6)
Pulls the updated AlpineFlow dist containing the four Tier C items:
- C1: data-flow-node-type attribute on node DOM elements
- C2: layout methods now exclude parented nodes by default
  (alpha-breaking; pass { includeChildren: true } to restore)
- C3: fitView vertical centering regression guard
- C4: canvas-level connectionRules for type-based connection
  filtering; also applies to addEdges

No WireFlow-side API changes. Migration guide updated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: sync with AlpineFlow Tier C (C1–C4)
flowAddNodes, flowRemoveNodes, flowAddEdges, flowRemoveEdges previously
only dispatched to the client — server-side $nodes/$edges drifted out
of sync, forcing consumers to manually filter arrays before every call.
The next Livewire re-render then morphed the stale state back over the
canvas, causing removed nodes to reappear.

Now the trait mutates server arrays to mirror the client cascade:
- flowRemoveNodes removes descendants (parentId chain) and cascades
  to edges touching any removed node
- flowAddNodes / flowAddEdges append
- flowRemoveEdges removes by id

Graceful fallback: if the component does not have $nodes/$edges as
public arrays, the methods skip server mutation and just dispatch
(backwards compatible).

Consumer code drops from ~15 lines of manual filtering to one line
per operation.

Migration guide updated with before/after examples.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat(trait): server-side state sync for flow*Nodes/Edges
Adds server-side trait methods for the new runState feature:
- flowSetNodeState(ids, state) — sets runState on server + dispatches
- flowResetStates() — clears all runState on server + dispatches

Also syncs the AlpineFlow bundle containing D2 (node.runState with
auto-applied CSS classes and theme visual defaults).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat(trait): D2 — flowSetNodeState + flowResetStates
wireflow:install now prompts developers to select optional addons via
Laravel Prompts multiselect. Currently offers the workflow addon; the
addon list grows as future extractions (animate, etc.) ship.

Non-interactive mode for CI and AI agents:
  php artisan wireflow:install --no-interaction           # core only
  php artisan wireflow:install --no-interaction --with=workflow

Each selected addon gets its import line + Alpine.plugin() registration
added to app.js. Idempotent — re-running with --force detects already-
installed addons and skips them.

Also syncs the AlpineFlow bundle (Tier A+B+C+D2 + workflow addon).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: interactive addon install + workflow bundle sync
1. CHANGELOG.md gets the v0.2.1-alpha entry covering: AlpineFlow
   bundle sync (Tier A+B+C+D2+workflow), trait state-sync fix for
   flow*Nodes/Edges, flowSetNodeState/flowResetStates methods, and
   the interactive addon install command.
2. docs/server/trait.md updated: flow*Nodes/Edges descriptions now
   reflect the server-side state sync + cascade behavior. Adds
   flowSetNodeState + flowResetStates if missing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chore: pre-tag cleanup — CHANGELOG + trait docs
…to-skip

Syncs alpineflow v0.2.1-alpha dist:
- Workflow addon: parallel branches (Promise.all fan-out/fan-in)
- Workflow addon: $flow.replay() execution replay
- Workflow addon: auto-skip unvisited nodes on completion
- Workflow addon: auto-reset before each run
- Workflow addon: setEdgeFailed + entering state
- Core: theme CSS updates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bundle includes parallel branches, replay, auto-skip, auto-reset,
$workflowRun magic, particleOptions, and edge-failed CSS class.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
chore: bundle sync + workflow addon improvements
Syncs alpineflow workflow addon with replay() → replayExecution()
rename to avoid collision with core animation replay() method.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Without wire:ignore, every Livewire re-render morphs the x-data attribute
on the flow-container div, causing Alpine to destroy and recreate the
entire flowCanvas scope. All server→client communication already goes
through flow:* events, so the canvas DOM never needs Livewire morphing.

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

Prevents Livewire's DOM morpher from destroying the flowCanvas Alpine
scope on re-renders. All server→client canvas updates already go through
flow:* events, so morphing was never the intended update path.

Default: true (canvas protected). Set :wire-ignore="false" to allow
Livewire morphing inside the canvas for edge cases where slot content
needs server-rendered updates.

Consumers using Blade conditionals inside <x-flow> slots should migrate
to $wire bindings: @if($prop) → x-show="$wire.prop"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dispatches flow:run to the client where the workflow addon's $flow.run()
handles traversal, state transitions, particles, and edge mirroring.
Handlers (onEnter, pickBranch, etc.) are pre-registered client-side.

Usage: $this->flowRun('trigger', ['payload' => [...], 'particleOnEdges' => true])

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

Add docs/components/flow.md with the full 28-prop reference for the
<x-flow> component (previously scattered across configuration.md and
package-specific sections). Document the --with=* install flag and the
workflow addon in commands.md. Clarify that raw AlpineFlow directives
remain valid inside <x-flow>, and correct the "three sync modes" list
(collab was never a sync mode — listen is).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
zachiler and others added 30 commits April 21, 2026 10:33
Mirrors <x-flow-schema-node>: emits a root element that AlpineFlow's
x-flow-wait directive owns at runtime, with optional SSR fallback when
:label and :duration-ms are passed for standalone previews. Component
class exposes a static formatDuration() helper that mirrors the JS
formatWaitDuration() in alpineflow's directive — same output across
client init and SSR. Registered as <x-flow-wait> in the service provider.
9 Pest tests covering both render paths plus the duration formatter.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add docs/addons/schema.md cross-linking the schema components, trait,
and validator rules; docs/addons/workflow.md covering install, the
<x-flow-wait> primitive, server trait methods, wire bridge events,
validateWorkflow() reference, and a quick-start. New
docs/components/flow-wait.md page. Update docs/addons/_index.md +
docs/components/_index.md to list the new pages.

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

feat(workflow): addon foundations — <x-flow-wait> + docs reorg
Mirrors <x-flow-schema-node>: emits a root element that AlpineFlow's
x-flow-condition directive owns at runtime. When :label or :condition is
provided, paints an SSR fallback header + pretty-printed body + three
handles (target / true / false) so the node looks right before JS init
and during Livewire morph diffs. PHP prettyPrintCondition() helper
mirrors the JS one — same output across SSR and runtime. Direction
defaults to 'horizontal'; pass 'vertical' to flip the layout. Registered
as <x-flow-condition-node>.

13 Pest tests covering the directive-only render path, SSR fallback with
the three handles, direction prop, default header label, and the full
operator coverage of prettyPrintCondition (equals/notEquals, comparisons,
in/notIn, exists, matches, evaluate-fallback, default placeholder).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Wraps Alpine.data('flowReplayControls') from alpineflow's workflow addon.
Renders Play/Pause toggle, Restart, Speed dropdown (default speeds 0.5,
1, 2, 4×). When the bound handle exposes scrubTo(), an interactive
scrubber appears; otherwise a non-interactive progress bar is rendered;
both gated on hasPlayableSource so the wrap stays hidden until a handle
or executionLog is available. Time readout uses the factory's
formatTime() helper. Props: :handle (Alpine expression naming a property
on the canvas), :target (selector for page-level placement), :speeds.
Registered as <x-flow-replay-controls>.

8 Pest tests covering the toolbar root, the three controls, speeds
forwarding, target attribute, scrubber/progress gating, time readout,
and the hasPlayableSource gate around the progress wrap.

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

XSS-safety guarantee: every dynamic field is rendered via x-text on a
discrete element. NEVER x-html with built strings. The Pest test asserts
the rendered HTML contains 'x-text="event.nodeId"' AND does NOT contain
the substring 'x-html' anywhere in the output, locking the contract.

Component composes 12 per-type templates (run:started/complete/stopped/
error, node:enter/exit, edge:taken/untaken/failed, parallel:fork,
wait:start/end, branch:chosen). Filter dropdown drives All / Errors /
Lifecycle modes. Auto-scroll-while-running with manual override (scrolls
pause when user scrolls up; resume when they scroll back to bottom).
Row click dispatches a flow:highlight-node CustomEvent so consumers can
focus the corresponding node. Props: :source, :target, :filter,
:max-events. Registered as <x-flow-execution-log>.

9 Pest tests covering header + filter, empty state, per-type templates,
the no-x-html XSS-safety assertion, prop forwarding, click hook, and the
auto-scroll body hook.

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

Three small Blade components wrapping the matching Alpine.data factories.
<x-flow-run-button> reads handlers from canvas DOM via :handlers-key
(default 'runHandlers'), auto-disables during runs, and supports a slot
override for custom labels. <x-flow-stop-button> hides itself when idle
unless :always-visible, calls canvas.stopRun() on click. <x-flow-reset-
button> calls resetStates + resetExecutionLog. All three accept :target
for page-level placement. Registered in the service provider.

10 Pest tests across the trio: default labels, factory wiring, prop
forwarding (startId, options, handlersKey, alwaysVisible, target), slot
override behaviour for each.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pages for <x-flow-condition-node>, <x-flow-replay-controls>,
<x-flow-execution-log>, <x-flow-run-button>, <x-flow-stop-button>, and
<x-flow-reset-button>. Each page covers usage in <x-flow> slots and
page-level via :target, props table, slot behaviour, and any subtle
contracts (XSS-safety on execution-log, capability detection on
replay-controls, runState gating on run/stop). Updated
docs/components/_index.md grouping to list the six new components and
docs/addons/workflow.md to cross-link them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bundles updated with x-flow-condition, the five Alpine.data factories
(flowReplayControls, flowExecutionLog, flowRunButton, flowStopButton,
flowResetButton), and the matching .flow-condition-node /
.flow-replay-controls / .flow-execution-log / .flow-run-button /
.flow-stop-button / .flow-reset-button structural and theme rules.

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

feat(workflow): UI primitives — condition node + replay controls + execution log + run/stop/reset
Picks up the lazy `ensureCanvas` re-resolution in the workflow factories
(flowRunButton / flowStopButton / flowResetButton / flowReplayControls /
flowExecutionLog) so consumers placing those components as siblings of
.flow-container in the DOM no longer hit the init-order timing bug.

Upstream: getartisanflow/alpineflow#23 (merged into dev).

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

chore: resync dist with alpineflow lazy-canvas-resolution fix
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