@puckeditor/plugin-ai 0.4.1-canary.fd69f4a0 → 0.5.0-canary.989c664e

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/index.css CHANGED
@@ -1,25 +1,26 @@
1
1
  /* css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/Chat/styles.module.css/#css-module-data */
2
- ._Chat_lckw1_1 {
2
+ ._Chat_3s08c_1 {
3
3
  background: white;
4
4
  height: 100%;
5
5
  display: flex;
6
6
  flex-direction: column;
7
7
  text-align: left;
8
8
  }
9
- ._Chat-header_lckw1_9 {
9
+ ._Chat-header_3s08c_9 {
10
10
  display: block;
11
11
  padding: 8px 16px;
12
12
  font-weight: 600;
13
13
  border-bottom: 1px solid var(--puck-color-grey-09);
14
14
  }
15
15
  @media (min-width: 638px) {
16
- ._Chat-header_lckw1_9 {
16
+ ._Chat-header_3s08c_9 {
17
17
  display: block;
18
18
  padding: 16px;
19
19
  }
20
20
  }
21
- ._Chat-placeholder_lckw1_23 {
21
+ ._Chat-placeholder_3s08c_23 {
22
22
  align-items: center;
23
+ box-sizing: border-box;
23
24
  color: var(--puck-color-grey-06);
24
25
  display: none;
25
26
  justify-content: center;
@@ -30,37 +31,37 @@
30
31
  gap: 8px;
31
32
  }
32
33
  @media (min-width: 638px) {
33
- ._Chat-placeholder_lckw1_23 {
34
+ ._Chat-placeholder_3s08c_23 {
34
35
  display: flex;
35
36
  }
36
37
  }
37
- ._Chat-actions_lckw1_41 {
38
+ ._Chat-actions_3s08c_42 {
38
39
  display: flex;
39
40
  gap: 8px;
40
41
  justify-content: center;
41
42
  flex-wrap: wrap;
42
43
  margin-top: 4px;
43
44
  }
44
- ._Chat-action_lckw1_41,
45
- ._Chat-actionOutlined_lckw1_50 {
45
+ ._Chat-action_3s08c_42,
46
+ ._Chat-actionOutlined_3s08c_51 {
46
47
  border: 1px solid var(--puck-color-azure-04);
47
48
  border-radius: 16px;
48
49
  padding: 4px 12px;
49
50
  font-size: 12px;
50
51
  cursor: pointer;
51
52
  }
52
- ._Chat-action_lckw1_41 {
53
+ ._Chat-action_3s08c_42 {
53
54
  background: var(--puck-color-azure-04);
54
55
  color: white;
55
56
  }
56
- ._Chat-action_lckw1_41:hover {
57
+ ._Chat-action_3s08c_42:hover {
57
58
  opacity: 0.8;
58
59
  }
59
- ._Chat-actionOutlined_lckw1_50 {
60
+ ._Chat-actionOutlined_3s08c_51 {
60
61
  background: transparent;
61
62
  color: var(--puck-color-azure-04);
62
63
  }
63
- ._Chat-actionOutlined_lckw1_50:hover {
64
+ ._Chat-actionOutlined_3s08c_51:hover {
64
65
  background: var(--puck-color-azure-11);
65
66
  }
66
67
 
package/dist/index.d.mts CHANGED
@@ -146,6 +146,17 @@ type ResetOperation = {
146
146
  op: "reset";
147
147
  };
148
148
  type Operation = AddOperation | UpdateOperation | UpdateRootOperation | MoveOperation | DeleteOperation | DuplicateOperation | ResetOperation;
149
+ type TokenUsage = {
150
+ inputTokens: number | undefined;
151
+ outputTokens: number | undefined;
152
+ totalTokens: number | undefined;
153
+ reasoningTokens?: number | undefined;
154
+ cachedInputTokens?: number | undefined;
155
+ };
156
+ type DataFinish = {
157
+ totalCost: number;
158
+ tokenUsage: TokenUsage;
159
+ };
149
160
  type PuckDataParts = {
150
161
  "new-chat-created": {
151
162
  chatId: string;
@@ -166,6 +177,7 @@ type PuckDataParts = {
166
177
  [breakpoint: number]: string;
167
178
  }[];
168
179
  };
180
+ finish: DataFinish;
169
181
  page: Data;
170
182
  };
171
183
  type PuckProviderMetadata = {
package/dist/index.d.ts CHANGED
@@ -146,6 +146,17 @@ type ResetOperation = {
146
146
  op: "reset";
147
147
  };
148
148
  type Operation = AddOperation | UpdateOperation | UpdateRootOperation | MoveOperation | DeleteOperation | DuplicateOperation | ResetOperation;
149
+ type TokenUsage = {
150
+ inputTokens: number | undefined;
151
+ outputTokens: number | undefined;
152
+ totalTokens: number | undefined;
153
+ reasoningTokens?: number | undefined;
154
+ cachedInputTokens?: number | undefined;
155
+ };
156
+ type DataFinish = {
157
+ totalCost: number;
158
+ tokenUsage: TokenUsage;
159
+ };
149
160
  type PuckDataParts = {
150
161
  "new-chat-created": {
151
162
  chatId: string;
@@ -166,6 +177,7 @@ type PuckDataParts = {
166
177
  [breakpoint: number]: string;
167
178
  }[];
168
179
  };
180
+ finish: DataFinish;
169
181
  page: Data;
170
182
  };
171
183
  type PuckProviderMetadata = {
package/dist/index.js CHANGED
@@ -518,7 +518,7 @@ var get_class_name_factory_default = getClassNameFactory;
518
518
 
519
519
  // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/Chat/styles.module.css#css-module
520
520
  init_react_import();
521
- var styles_module_default = { "Chat": "_Chat_lckw1_1", "Chat-header": "_Chat-header_lckw1_9", "Chat-placeholder": "_Chat-placeholder_lckw1_23", "Chat-actions": "_Chat-actions_lckw1_41", "Chat-action": "_Chat-action_lckw1_41", "Chat-actionOutlined": "_Chat-actionOutlined_lckw1_50" };
521
+ var styles_module_default = { "Chat": "_Chat_3s08c_1", "Chat-header": "_Chat-header_3s08c_9", "Chat-placeholder": "_Chat-placeholder_3s08c_23", "Chat-actions": "_Chat-actions_3s08c_42", "Chat-action": "_Chat-action_3s08c_42", "Chat-actionOutlined": "_Chat-actionOutlined_3s08c_51" };
522
522
 
523
523
  // src/components/ChatBody/index.tsx
524
524
  init_react_import();
package/dist/index.mjs CHANGED
@@ -514,7 +514,7 @@ var get_class_name_factory_default = getClassNameFactory;
514
514
 
515
515
  // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/Chat/styles.module.css#css-module
516
516
  init_react_import();
517
- var styles_module_default = { "Chat": "_Chat_lckw1_1", "Chat-header": "_Chat-header_lckw1_9", "Chat-placeholder": "_Chat-placeholder_lckw1_23", "Chat-actions": "_Chat-actions_lckw1_41", "Chat-action": "_Chat-action_lckw1_41", "Chat-actionOutlined": "_Chat-actionOutlined_lckw1_50" };
517
+ var styles_module_default = { "Chat": "_Chat_3s08c_1", "Chat-header": "_Chat-header_3s08c_9", "Chat-placeholder": "_Chat-placeholder_3s08c_23", "Chat-actions": "_Chat-actions_3s08c_42", "Chat-action": "_Chat-action_3s08c_42", "Chat-actionOutlined": "_Chat-actionOutlined_3s08c_51" };
518
518
 
519
519
  // src/components/ChatBody/index.tsx
520
520
  init_react_import();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/plugin-ai",
3
- "version": "0.4.1-canary.fd69f4a0",
3
+ "version": "0.5.0-canary.989c664e",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "puckeditor/puck",
6
6
  "bugs": "https://github.com/puckeditor/puck/issues",