Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a JS lib to support trame-client API through an iframe #2

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

bourdaisj
Copy link
Contributor

@bourdaisj bourdaisj commented Nov 13, 2024

uses: Kitware/trame-client#29 for state watchers API

js-lib/package.json Outdated Show resolved Hide resolved
js-lib/LICENSE Outdated Show resolved Hide resolved
Copy link
Collaborator

@jourdain jourdain left a comment

Choose a reason for hiding this comment

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

LGTM at a high level.

@bourdaisj
Copy link
Contributor Author

@CharlesGueunet

@bourdaisj bourdaisj force-pushed the support-cross-origin-parent-communication branch 4 times, most recently from 112f7da to 34c96a8 Compare December 9, 2024 20:50
similar to trame-client js-api, trame-iframe js-api provides an agnostic library
that can be installed in a regular JS project.
trame-iframe js-api could be installed in a host application (could be
react/streamlit/vue/... based) to proxy the trame API calls through the
iframe to the Communicator and the trame application.
The goal is to replicate the trame-client js-api features to make it
transparent to the consumer code.
API:
- trame.state.set
- trame.state.update
- trame.state.watch
- trame.trigger

This is still possible to directly interact with the Communicator from
an host application by manually sending/listening to events.
@bourdaisj bourdaisj force-pushed the support-cross-origin-parent-communication branch 2 times, most recently from 6632f86 to ea1cbfb Compare December 11, 2024 15:59
"vite": "^5.2.0"
},
"dependencies": {
"@kitware/trame-iframe-client": "/home/jules/projects/kitware/trame/repos/trame-iframe/js-lib/dist/trame-iframe.mjs"
Copy link
Collaborator

Choose a reason for hiding this comment

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

fix that

@bourdaisj bourdaisj force-pushed the support-cross-origin-parent-communication branch from ea1cbfb to 817132b Compare December 11, 2024 16:02
@jourdain jourdain merged commit fc5d8ae into master Dec 11, 2024
6 checks passed
@jourdain jourdain deleted the support-cross-origin-parent-communication branch December 11, 2024 16:06
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