update docs, dependencies and tests #85
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and updates across the codebase, focusing on Storybook configuration, documentation enhancements, transferables demo implementation, dependency updates, and improved test coverage. The changes modernize the Storybook setup, add interactive examples for file transfer using transferables, update dependencies for compatibility and better tooling, and strengthen the test suite for core connection logic.
Storybook and Documentation Improvements:
@storybook/addon-docsinstead of deprecated or less relevant addons, and switched imports in documentation files to use@storybook/addon-docs/blocksfor better compatibility. (.storybook/main.ts,docs/GettingStarted.mdx,docs/NestedAPIDemo.mdx,package.json) [1] [2] [3] [4]docs/ManagingFileTransfers.mdx, explaining how to usewithTransferablefor efficient file and binary data transfers between host and worker, including code samples and an interactive demo.Transferables Demo Implementation:
FileTransferExample.tsxand a corresponding worker implementation to demonstrate transferring files between host and worker using transferables, including UI for file selection and download. (docs/examples/Transferables/FileTransferExample.tsx,docs/examples/Transferables/worker.ts) [1] [2]Dependency and Tooling Updates:
eslint-plugin-storybookand configured recommended rules for Storybook in ESLint. (package.json,eslint.config.js) [1] [2] [3]package.json)Core Logic and Example Enhancements:
IframesExample.tsxto handle parallel connections to multiple iframes, with better error handling and cleanup. (docs/examples/Iframes/IframesExample.tsx)src/host.tsto properly support inline iframes (srcdoc/about:blank). (src/host.ts)Testing Improvements:
guest.connectto verify handshake, RPC wiring, and cleanup behavior using spies and mocks for all relevant helpers and RPC methods. (tests/guest.test.ts)tests/handshake.test.ts)