@builder.io/ai-utils 0.0.27 → 0.0.29

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 CHANGED
@@ -98,11 +98,27 @@ export interface ContentUpdateEvent {
98
98
  data: ContentUpdatePatch[];
99
99
  }
100
100
  export type ContentUpdatePatch = ContentInsertBeforePatch | ContentInsertAfterPatch | ContentPropsUpdatePatch | ContentSetChildrenPatch | ContentStyleUpdatePatch;
101
+ export interface NodeData {
102
+ /**
103
+ * When dealing with column nodes we need to store the column index so
104
+ * we can properly add nodes inside of a column if needed.
105
+ */
106
+ columnIndex?: number;
107
+ }
101
108
  interface ContentPatchBase {
102
109
  id: string;
103
110
  index: number;
104
111
  value: string;
105
112
  ts: number;
113
+ /**
114
+ * Any additional data about the patch. For example, this payload could contain the
115
+ * column index to update when dealing with a Columns component.
116
+ */
117
+ data?: NodeData;
118
+ /**
119
+ * A change value is considered incomplete until we also parsed it's closing xml tag.
120
+ */
121
+ incomplete?: boolean;
106
122
  }
107
123
  export interface ContentInsertBeforePatch extends ContentPatchBase {
108
124
  type: "insert_before";
@@ -13,6 +13,10 @@ export interface AssistantSettings {
13
13
  showHeaderButton?: boolean;
14
14
  showPrompt?: boolean;
15
15
  showSparklesInInputBar?: boolean;
16
+ /**
17
+ * Show the undo button under the assistant's message.
18
+ */
19
+ showUndoButton?: boolean;
16
20
  suggestedItems: Snippet[];
17
21
  theme?: "dark" | "light";
18
22
  transparentBackground?: boolean;
package/dist/settings.js CHANGED
@@ -7,6 +7,7 @@ const urlParamSettings = [
7
7
  "showHeaderButton",
8
8
  "showPrompt",
9
9
  "showSparklesInInputBar",
10
+ "showUndoButton",
10
11
  "requestState",
11
12
  "theme",
12
13
  "transparentBackground",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/ai-utils",
3
- "version": "0.0.27",
3
+ "version": "0.0.29",
4
4
  "description": "Builder.io AI utils",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",