@runtypelabs/persona 3.27.0 → 3.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/codegen.cjs +80 -0
- package/dist/codegen.d.cts +152 -0
- package/dist/codegen.d.ts +152 -0
- package/dist/codegen.js +80 -0
- package/dist/index.cjs +35 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.global.js +20 -20
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +38 -38
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
- package/src/codegen.test.ts +82 -0
- package/src/codegen.ts +20 -0
- package/src/utils/code-generators.ts +38 -9
package/dist/index.d.cts
CHANGED
|
@@ -8439,6 +8439,15 @@ type CodeGeneratorOptions = {
|
|
|
8439
8439
|
* Only affects script formats (script-installer, script-manual, script-advanced).
|
|
8440
8440
|
*/
|
|
8441
8441
|
windowKey?: string;
|
|
8442
|
+
/**
|
|
8443
|
+
* CSS selector for the mount target. When omitted, the widget mounts on
|
|
8444
|
+
* `body` (the existing default). When provided, the generated snippet mounts
|
|
8445
|
+
* into that element: ESM / React / manual / advanced formats emit it as the
|
|
8446
|
+
* `target` argument to `initAgentWidget()`, and `script-installer` serializes
|
|
8447
|
+
* it into `data-config` (the installer reads `config.target`).
|
|
8448
|
+
* @default "body"
|
|
8449
|
+
*/
|
|
8450
|
+
target?: string;
|
|
8442
8451
|
};
|
|
8443
8452
|
declare function generateCodeSnippet(config: any, format?: CodeFormat, options?: CodeGeneratorOptions): string;
|
|
8444
8453
|
|
package/dist/index.d.ts
CHANGED
|
@@ -8439,6 +8439,15 @@ type CodeGeneratorOptions = {
|
|
|
8439
8439
|
* Only affects script formats (script-installer, script-manual, script-advanced).
|
|
8440
8440
|
*/
|
|
8441
8441
|
windowKey?: string;
|
|
8442
|
+
/**
|
|
8443
|
+
* CSS selector for the mount target. When omitted, the widget mounts on
|
|
8444
|
+
* `body` (the existing default). When provided, the generated snippet mounts
|
|
8445
|
+
* into that element: ESM / React / manual / advanced formats emit it as the
|
|
8446
|
+
* `target` argument to `initAgentWidget()`, and `script-installer` serializes
|
|
8447
|
+
* it into `data-config` (the installer reads `config.target`).
|
|
8448
|
+
* @default "body"
|
|
8449
|
+
*/
|
|
8450
|
+
target?: string;
|
|
8442
8451
|
};
|
|
8443
8452
|
declare function generateCodeSnippet(config: any, format?: CodeFormat, options?: CodeGeneratorOptions): string;
|
|
8444
8453
|
|