@puckeditor/plugin-ai 0.6.0-canary.e94eafc3 → 0.6.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/index.css CHANGED
@@ -924,6 +924,156 @@ p {
924
924
  color: var(--puck-color-grey-05);
925
925
  }
926
926
 
927
+ /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/PlanGrid/styles.module.css/#css-module-data */
928
+ ._PlanGrid--loading_yaytb_1 {
929
+ opacity: 0;
930
+ }
931
+ ._PlanGrid-grid_yaytb_5 {
932
+ color: var(--puck-color-grey-02);
933
+ display: grid;
934
+ gap: 16px;
935
+ text-align: left;
936
+ @media (min-width: 768px) {
937
+ grid-template-columns: 1fr 1fr 1fr;
938
+ }
939
+ }
940
+ ._PlanGrid-enterprise_yaytb_16 {
941
+ color: var(--puck-color-grey-04);
942
+ font-size: var(--puck-font-size-xxs);
943
+ margin-left: auto;
944
+ margin-right: auto;
945
+ padding-inline: 4px;
946
+ padding-top: 20px;
947
+ text-align: center;
948
+ }
949
+ ._PlanGrid-enterprise_yaytb_16 a {
950
+ color: var(--puck-color-azure-04);
951
+ cursor: pointer;
952
+ }
953
+
954
+ /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/PlanCard/styles.module.css/#css-module-data */
955
+ ._PlanCard_xeanv_1 {
956
+ border: 1px solid var(--puck-color-grey-09);
957
+ border-radius: 16px;
958
+ display: flex;
959
+ gap: 8px;
960
+ flex-direction: column;
961
+ min-width: 256px;
962
+ padding: 8px;
963
+ }
964
+ ._PlanCard--enterprise_xeanv_11 {
965
+ flex-direction: row;
966
+ grid-column: span 3;
967
+ }
968
+ ._PlanCard-title_xeanv_16 {
969
+ font-size: var(--puck-font-size-xs);
970
+ font-weight: 700;
971
+ white-space: nowrap;
972
+ }
973
+ ._PlanCard-header_xeanv_22 {
974
+ box-sizing: border-box;
975
+ display: flex;
976
+ flex-direction: column;
977
+ gap: 4px;
978
+ padding: 12px 16px;
979
+ width: 100%;
980
+ }
981
+ ._PlanCard-features_xeanv_31 {
982
+ display: grid;
983
+ gap: 4px;
984
+ list-style: none;
985
+ margin: 0;
986
+ padding: 0;
987
+ }
988
+ ._PlanCard-feature_xeanv_31 {
989
+ align-items: center;
990
+ display: flex;
991
+ gap: 4px;
992
+ color: var(--puck-color-grey-05);
993
+ font-size: var(--puck-font-size-xxs);
994
+ }
995
+ ._PlanCard-featureIcon_xeanv_47 {
996
+ align-self: flex-start;
997
+ margin-top: 5px;
998
+ }
999
+ ._PlanCard-featureTitle_xeanv_52 {
1000
+ color: var(--puck-color-grey-04);
1001
+ font-weight: 600;
1002
+ }
1003
+ ._PlanCard-priceValue_xeanv_57 {
1004
+ font-size: var(--puck-font-size-m);
1005
+ }
1006
+ ._PlanCard-priceInterval_xeanv_61 {
1007
+ color: var(--puck-color-grey-05);
1008
+ }
1009
+ ._PlanCard-body_xeanv_65 {
1010
+ background-color: var(--puck-color-grey-12);
1011
+ border: 1px solid var(--puck-color-grey-11);
1012
+ border-radius: 8px;
1013
+ padding: 16px;
1014
+ flex-grow: 1;
1015
+ }
1016
+ ._PlanCard--enterprise_xeanv_11 ._PlanCard-body_xeanv_65 {
1017
+ display: flex;
1018
+ gap: 8px;
1019
+ width: 100%;
1020
+ }
1021
+ ._PlanCard-section_xeanv_79 {
1022
+ padding-bottom: 16px;
1023
+ min-width: 192px;
1024
+ }
1025
+ ._PlanCard-section_xeanv_79:last-of-type {
1026
+ padding-bottom: 0;
1027
+ }
1028
+ ._PlanCard-section_xeanv_79 + ._PlanCard-section_xeanv_79 {
1029
+ border-top: 1px solid var(--puck-color-grey-09);
1030
+ padding-top: 16px;
1031
+ }
1032
+ ._PlanCard--enterprise_xeanv_11 {
1033
+ ._PlanCard-section_xeanv_79 + ._PlanCard-section_xeanv_79 {
1034
+ border-left: 1px solid var(--puck-color-grey-09);
1035
+ border-top: none;
1036
+ padding-left: 16px;
1037
+ padding-top: 0;
1038
+ }
1039
+ }
1040
+ ._PlanCard-sectionTitle_xeanv_102 {
1041
+ font-size: var(--puck-font-size-xs);
1042
+ font-weight: 500;
1043
+ margin-bottom: 8px;
1044
+ }
1045
+ ._PlanCard-sectionBody_xeanv_108 + ._PlanCard-sectionTitle_xeanv_102 {
1046
+ border-top: 1px solid var(--puck-color-grey-09);
1047
+ margin-top: 16px;
1048
+ padding-top: 16px;
1049
+ }
1050
+ ._PlanCard-sectionBody_xeanv_108 {
1051
+ color: var(--puck-color-grey-03);
1052
+ font-size: var(--puck-font-size-xxs);
1053
+ display: grid;
1054
+ gap: 2px;
1055
+ }
1056
+ ._PlanCard-usageItem_xeanv_121 {
1057
+ display: flex;
1058
+ gap: 8px;
1059
+ font-size: var(--puck-font-size-xxs);
1060
+ }
1061
+ ._PlanCard-usageLabel_xeanv_127 {
1062
+ color: var(--puck-color-grey-04);
1063
+ font-weight: 500;
1064
+ }
1065
+ ._PlanCard-usageValue_xeanv_132 {
1066
+ color: var(--puck-color-grey-05);
1067
+ font-family: var(--puck-font-family-monospaced);
1068
+ margin-left: auto;
1069
+ }
1070
+ ._PlanCard-action_xeanv_138 {
1071
+ align-items: flex-end;
1072
+ display: flex;
1073
+ justify-content: flex-end;
1074
+ width: 100%;
1075
+ }
1076
+
927
1077
  /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Section/Section.module.css/#css-module-data */
928
1078
  ._Section-inner_1uwo0_1 {
929
1079
  margin-left: auto;
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { PuckAction, Data, Config } from '@puckeditor/core';
3
4
  import { LanguageModelUsage, UIMessage, CreateUIMessage, DataUIPart, ChatStatus } from 'ai';
4
- import { PuckAction, Data } from '@puckeditor/core';
5
5
 
6
6
  type _JSONSchema = boolean | JSONSchema;
7
7
  type JSONSchema = {
@@ -71,6 +71,7 @@ type JSONSchema = {
71
71
 
72
72
  type ComponentAiParams = {
73
73
  instructions?: string;
74
+ exclude?: boolean;
74
75
  defaultZone?: { allow?: string[]; disallow?: string[]; disabled?: boolean };
75
76
  };
76
77
 
@@ -187,6 +188,18 @@ type PuckProviderMetadata = {
187
188
 
188
189
  type PuckMessage = UIMessage<PuckProviderMetadata, PuckDataParts>;
189
190
 
191
+ type RequestOptions = {
192
+ body?: {
193
+ chatId?: string;
194
+ trigger?: string;
195
+ messages?: PuckMessage[];
196
+ pageData?: Data;
197
+ config?: Config;
198
+ [key: string]: any;
199
+ };
200
+ headers?: HeadersInit;
201
+ credentials?: RequestCredentials;
202
+ };
190
203
  type AiPluginProps = {
191
204
  host?: string;
192
205
  chat?: {
@@ -198,6 +211,7 @@ type AiPluginProps = {
198
211
  }[];
199
212
  };
200
213
  scrollTracking?: boolean;
214
+ prepareRequest?: (opts: RequestOptions) => RequestOptions | Promise<RequestOptions>;
201
215
  };
202
216
  declare global {
203
217
  interface Window {
@@ -223,4 +237,4 @@ declare function createAiPlugin(opts?: AiPluginProps): {
223
237
  };
224
238
  };
225
239
 
226
- export { createAiPlugin };
240
+ export { type ComponentAiParams, type FieldAiParams, createAiPlugin };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { PuckAction, Data, Config } from '@puckeditor/core';
3
4
  import { LanguageModelUsage, UIMessage, CreateUIMessage, DataUIPart, ChatStatus } from 'ai';
4
- import { PuckAction, Data } from '@puckeditor/core';
5
5
 
6
6
  type _JSONSchema = boolean | JSONSchema;
7
7
  type JSONSchema = {
@@ -71,6 +71,7 @@ type JSONSchema = {
71
71
 
72
72
  type ComponentAiParams = {
73
73
  instructions?: string;
74
+ exclude?: boolean;
74
75
  defaultZone?: { allow?: string[]; disallow?: string[]; disabled?: boolean };
75
76
  };
76
77
 
@@ -187,6 +188,18 @@ type PuckProviderMetadata = {
187
188
 
188
189
  type PuckMessage = UIMessage<PuckProviderMetadata, PuckDataParts>;
189
190
 
191
+ type RequestOptions = {
192
+ body?: {
193
+ chatId?: string;
194
+ trigger?: string;
195
+ messages?: PuckMessage[];
196
+ pageData?: Data;
197
+ config?: Config;
198
+ [key: string]: any;
199
+ };
200
+ headers?: HeadersInit;
201
+ credentials?: RequestCredentials;
202
+ };
190
203
  type AiPluginProps = {
191
204
  host?: string;
192
205
  chat?: {
@@ -198,6 +211,7 @@ type AiPluginProps = {
198
211
  }[];
199
212
  };
200
213
  scrollTracking?: boolean;
214
+ prepareRequest?: (opts: RequestOptions) => RequestOptions | Promise<RequestOptions>;
201
215
  };
202
216
  declare global {
203
217
  interface Window {
@@ -223,4 +237,4 @@ declare function createAiPlugin(opts?: AiPluginProps): {
223
237
  };
224
238
  };
225
239
 
226
- export { createAiPlugin };
240
+ export { type ComponentAiParams, type FieldAiParams, createAiPlugin };