feat: sdks and docs (#239)

* init

* fix

* update docs

* bump: all sdks

* rename types test
This commit is contained in:
Carl-Gerhard Lindesvärd
2025-11-19 21:56:47 +01:00
committed by GitHub
parent 790801b728
commit 83e223a496
50 changed files with 793 additions and 137 deletions

View File

@@ -1,5 +1,6 @@
---
import type { OpenPanelMethodNames, OpenPanelOptions } from '@openpanel/web';
import { getInitSnippet } from '@openpanel/web';
type Props = Omit<OpenPanelOptions, 'filter'> & {
profileId?: string;
@@ -32,7 +33,7 @@ const methods: { name: OpenPanelMethodNames; value: unknown }[] = [
value: {
...options,
sdk: 'astro',
sdkVersion: '1.0.2',
sdkVersion: '1.0.3',
},
},
];
@@ -51,7 +52,7 @@ if (globalProperties) {
});
}
const scriptContent = `window.op = window.op || function(...args) {(window.op.q = window.op.q || []).push(args)};
const scriptContent = `${getInitSnippet()}
${methods
.map((method) => {
return `window.op('${method.name}', ${stringify(method.value)});`;