@builder.io/ai-utils 0.0.53 → 0.0.55
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/events.d.ts +4 -1
- package/dist/settings.d.ts +4 -0
- package/dist/settings.js +2 -1
- package/package.json +1 -1
package/dist/events.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ export interface ContentUpdateEvent {
|
|
|
98
98
|
type: "assistant.content.update";
|
|
99
99
|
data: ContentUpdatePatch[];
|
|
100
100
|
}
|
|
101
|
-
export type ContentUpdatePatch = ContentTsCodePatch | ContentInsertBeforePatch | ContentInsertAfterPatch | ContentPropsUpdatePatch | ContentSetChildrenPatch | ContentStyleUpdatePatch | ContentDeletePatch | ContentSetStorePatch | ContentSetMountPatch | ContentMovePatch | ContentMoveAfterPatch | ContentMoveBeforePatch;
|
|
101
|
+
export type ContentUpdatePatch = ContentTsCodePatch | ContentInsertBeforePatch | ContentInsertAfterPatch | ContentPropsUpdatePatch | ContentSetChildrenPatch | ContentStyleUpdatePatch | ContentDeletePatch | ContentSetStorePatch | ContentSetMountPatch | ContentMovePatch | ContentMoveAfterPatch | ContentMoveBeforePatch | ContentSetTagNamePatch;
|
|
102
102
|
export interface NodeData {
|
|
103
103
|
/**
|
|
104
104
|
* When dealing with some builder nodes that contain virtual children like Columns, and PersonalizationContainer,
|
|
@@ -127,6 +127,9 @@ interface ContentPatchBase {
|
|
|
127
127
|
export interface ContentTsCodePatch extends ContentPatchBase {
|
|
128
128
|
type: "ts_code";
|
|
129
129
|
}
|
|
130
|
+
export interface ContentSetTagNamePatch extends ContentPatchBase {
|
|
131
|
+
type: "set_tag_name";
|
|
132
|
+
}
|
|
130
133
|
export interface ContentInsertBeforePatch extends ContentPatchBase {
|
|
131
134
|
type: "insert_before";
|
|
132
135
|
snapshotBuilderId?: string;
|
package/dist/settings.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ export interface Snippet {
|
|
|
50
50
|
}
|
|
51
51
|
interface IframeSettings extends Partial<AssistantSettings> {
|
|
52
52
|
local?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* The URL of the assistant.
|
|
55
|
+
*/
|
|
56
|
+
baseUrl?: string;
|
|
53
57
|
}
|
|
54
58
|
export declare function getAssistantUrl(opts?: IframeSettings): string;
|
|
55
59
|
export declare function parseAssistantUrlSettings(url: string): Partial<AssistantSettings>;
|
package/dist/settings.js
CHANGED
|
@@ -15,7 +15,8 @@ const urlParamSettings = [
|
|
|
15
15
|
"viewId",
|
|
16
16
|
];
|
|
17
17
|
export function getAssistantUrl(opts = {}) {
|
|
18
|
-
const url = new URL(opts.
|
|
18
|
+
const url = new URL(opts.baseUrl ??
|
|
19
|
+
(opts.local ? "http://localhost:7242" : "https://assistant.builder.io"));
|
|
19
20
|
urlParamSettings.forEach((key) => {
|
|
20
21
|
const value = opts[key];
|
|
21
22
|
if (typeof value === "string" || typeof value === "boolean") {
|