Skip to content

feat: URL params for iframe pre-selection (v1.6.0)#50

Merged
CristianEdwards merged 2 commits into
mainfrom
Release
Apr 22, 2026
Merged

feat: URL params for iframe pre-selection (v1.6.0)#50
CristianEdwards merged 2 commits into
mainfrom
Release

Conversation

@CristianEdwards

Copy link
Copy Markdown
Owner

Adds support for URL query parameters so iframe embedders can deep-link into a specific predefined scenario with pre-selected flow sources and types.

Supported parameters

  • ?scenario=<slug> — loads a scenario from PredefinedScenarios/manifest.json (matches filename or slugified label)
  • &config=<slug> — activates a scenario tag (entry in document.scenarios)
  • &sources=a,b,c — comma-separated flow sources to activate
  • &types=a,b,c — comma-separated flow types to activate

Unknown values fall back silently. No effect on existing users when no params are present.

Example

```n
## Changes

- New `src/lib/urlParams.ts`: parses `window.location.search` and applies state via the editor store
- `src/app/App.tsx`: invokes `applyUrlParams()` once on mount
- Version bumped to 1.6.0

…sources, types)

Adds src/lib/urlParams.ts which parses window.location.search and applies scenario/config/sources/types to the editor store. Enables iframe embedders to deep-link into specific predefined scenarios with pre-selected flow sources and types. Unknown values are ignored silently. Bumps version to 1.6.0.
@CristianEdwards
CristianEdwards merged commit 1f9d063 into main Apr 22, 2026
3 checks passed
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