Plan 3 of the web embedding SDK: @zseven-w/op-web-sdk-react and -vue — thin read-only framework adapters over the TS core. Each: <DesignView> (canvas + viewer lifecycle), provider/inject of OpViewer, and read-only useDocument/useViewport/useActivePage. React via useSyncExternalStore (cache-invalidate-on-event); Vue via an async shallowRef provider so children inject the viewer after load. Self-contained (no pen-* deps; framework peer); React 5/5 + Vue 4/4 tests; both tsc clean.
12 lines
450 B
TypeScript
12 lines
450 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import { fileURLToPath } from 'node:url';
|
|
import { resolve } from 'node:path';
|
|
const here = fileURLToPath(new URL('.', import.meta.url));
|
|
export default defineConfig({
|
|
test: { environment: 'jsdom', globals: true },
|
|
resolve: { alias: {
|
|
'@zseven-w/op-web-sdk': resolve(here, '../op-web-sdk/src/index.ts'),
|
|
'virtual:op_web_sdk_wasm': resolve(here, '../op-web-sdk/test/wasm-stub.ts'),
|
|
} },
|
|
});
|