@puckeditor/plugin-ai 0.9.0-canary.d4a0bc62 → 0.9.0-canary.d582a110

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
@@ -922,15 +922,15 @@ p {
922
922
  }
923
923
 
924
924
  /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Menu/styles.module.css/#css-module-data */
925
- ._Menu_1tu16_1 {
925
+ ._Menu_1jr57_1 {
926
926
  display: flex;
927
927
  position: relative;
928
928
  }
929
- ._Menu-content_1tu16_6 {
929
+ ._Menu-content_1jr57_6 {
930
930
  outline: none;
931
931
  z-index: 1;
932
932
  }
933
- ._Menu-sections_1tu16_11 {
933
+ ._Menu-sections_1jr57_11 {
934
934
  background-color: white;
935
935
  border: 1px solid var(--puck-color-grey-09);
936
936
  border-radius: 8px;
@@ -940,40 +940,41 @@ p {
940
940
  padding-bottom: 4px;
941
941
  padding-top: 4px;
942
942
  }
943
- ._Menu-action_1tu16_22 {
943
+ ._Menu-action_1jr57_22 {
944
944
  background: none;
945
945
  border: none;
946
946
  margin-left: auto;
947
947
  padding: 0;
948
948
  }
949
- ._Menu-action_1tu16_22:hover:not(:disabled) {
949
+ ._Menu-action_1jr57_22:hover:not(:disabled) {
950
950
  cursor: pointer;
951
951
  opacity: 0.8;
952
952
  }
953
- ._Menu-action_1tu16_22:disabled {
953
+ ._Menu-action_1jr57_22:disabled {
954
954
  cursor: not-allowed;
955
955
  opacity: 0.5;
956
956
  }
957
- ._Menu-action_1tu16_22:focus-visible {
957
+ ._Menu-action_1jr57_22:focus-visible {
958
958
  outline: 2px solid var(--puck-color-azure-05);
959
959
  outline-offset: 2px;
960
960
  }
961
- ._Menu-list_1tu16_44 {
961
+ ._Menu-list_1jr57_44 {
962
962
  list-style: none;
963
963
  margin: 0;
964
964
  padding: 0;
965
965
  }
966
- ._Menu-list_1tu16_44 + ._Menu-list_1tu16_44 {
966
+ ._Menu-list_1jr57_44 + ._Menu-list_1jr57_44 {
967
967
  border-top: 1px solid var(--puck-color-grey-09);
968
968
  margin-top: 4px;
969
969
  }
970
- ._Menu-item_1tu16_55 {
970
+ ._Menu-item_1jr57_55 {
971
971
  align-items: center;
972
972
  background: none;
973
973
  border: none;
974
974
  box-sizing: border-box;
975
975
  color: var(--puck-color-grey-02);
976
976
  display: flex;
977
+ font-family: var(--puck-font-family);
977
978
  font-size: var(--puck-font-size-xxs);
978
979
  font-weight: 500;
979
980
  gap: 8px;
@@ -983,16 +984,16 @@ p {
983
984
  white-space: nowrap;
984
985
  width: 100%;
985
986
  }
986
- a._Menu-item_1tu16_55,
987
- button._Menu-item_1tu16_55 {
987
+ a._Menu-item_1jr57_55,
988
+ button._Menu-item_1jr57_55 {
988
989
  cursor: pointer;
989
990
  }
990
- a._Menu-item_1tu16_55:hover,
991
- button._Menu-item_1tu16_55:hover {
991
+ a._Menu-item_1jr57_55:hover,
992
+ button._Menu-item_1jr57_55:hover {
992
993
  background-color: var(--puck-color-azure-11);
993
994
  color: var(--puck-color-azure-04);
994
995
  }
995
- ._Menu-item--disabled_1tu16_83 {
996
+ ._Menu-item--disabled_1jr57_84 {
996
997
  cursor: not-allowed;
997
998
  opacity: 0.5;
998
999
  }
@@ -1287,15 +1288,15 @@ button._Menu-item_1tu16_55:hover {
1287
1288
  }
1288
1289
 
1289
1290
  /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Tag/Tag.module.css/#css-module-data */
1290
- ._Tag_s2h0n_1 {
1291
+ ._Tag_162k8_1 {
1291
1292
  align-items: center;
1292
1293
  display: flex;
1293
- text-transform: uppercase;
1294
+ text-transform: lowercase;
1294
1295
  font-family: var(--puck-font-family-monospaced);
1295
- font-weight: 600;
1296
+ font-weight: 500;
1296
1297
  font-size: var(--puck-font-size-xxxs);
1297
1298
  gap: 6px;
1298
- border-radius: 4px;
1299
+ border-radius: 16px;
1299
1300
  border: 1px solid currentColor;
1300
1301
  color: var(--puck-color-grey-05);
1301
1302
  padding: 4px 8px;
@@ -1304,34 +1305,35 @@ button._Menu-item_1tu16_55:hover {
1304
1305
  position: relative;
1305
1306
  z-index: 0;
1306
1307
  }
1307
- ._Tag--borderless_s2h0n_21 {
1308
+ ._Tag--borderless_162k8_21 {
1308
1309
  border: none;
1309
1310
  }
1310
- ._Tag--colorBlue_s2h0n_25 {
1311
- color: var(--puck-color-azure-05);
1311
+ ._Tag--colorBlue_162k8_25 {
1312
+ background-color: var(--puck-color-azure-05);
1313
+ color: var(--puck-color-white);
1312
1314
  }
1313
- ._Tag--colorGreen_s2h0n_29 {
1315
+ ._Tag--colorGreen_162k8_30 {
1314
1316
  color: var(--puck-color-green-06);
1315
1317
  }
1316
- ._Tag--colorRed_s2h0n_33 {
1318
+ ._Tag--colorRed_162k8_34 {
1317
1319
  color: var(--puck-color-red-04);
1318
1320
  }
1319
- ._Tag--colorMuted_s2h0n_37 {
1320
- color: var(--puck-color-grey-06);
1321
+ ._Tag--colorMuted_162k8_38 {
1322
+ color: var(--puck-color-grey-05);
1321
1323
  }
1322
- ._Tag-sprite_s2h0n_41 {
1324
+ ._Tag-sprite_162k8_42 {
1323
1325
  display: flex;
1324
1326
  }
1325
- ._Tag--pulse_s2h0n_45 {
1326
- ._Tag-sprite_s2h0n_41 {
1327
+ ._Tag--pulse_162k8_46 {
1328
+ ._Tag-sprite_162k8_42 {
1327
1329
  background: currentColor;
1328
1330
  border-radius: 50%;
1329
1331
  height: 5px;
1330
1332
  position: relative;
1331
1333
  width: 5px;
1332
1334
  }
1333
- ._Tag-sprite_s2h0n_41::before {
1334
- animation: _pulse_s2h0n_1 1s 0s infinite alternate;
1335
+ ._Tag-sprite_162k8_42::before {
1336
+ animation: _pulse_162k8_1 1s 0s infinite alternate;
1335
1337
  animation-fill-mode: both;
1336
1338
  background-color: color-mix(in srgb, currentColor 25%, transparent);
1337
1339
  border-radius: 50%;
@@ -1345,7 +1347,7 @@ button._Menu-item_1tu16_55:hover {
1345
1347
  z-index: -1;
1346
1348
  }
1347
1349
  }
1348
- @keyframes _pulse_s2h0n_1 {
1350
+ @keyframes _pulse_162k8_1 {
1349
1351
  0% {
1350
1352
  transform: scale(1);
1351
1353
  }
@@ -1353,7 +1355,7 @@ button._Menu-item_1tu16_55:hover {
1353
1355
  transform: scale(2);
1354
1356
  }
1355
1357
  }
1356
- ._Tag-label_s2h0n_79 {
1358
+ ._Tag-label_162k8_80 {
1357
1359
  margin-top: 1px;
1358
1360
  }
1359
1361
 
package/dist/index.d.mts CHANGED
@@ -115,37 +115,6 @@ type DataToolStatus = {
115
115
  status: ToolStatus;
116
116
  toolCallId: string;
117
117
  };
118
- type AiFieldTypeShape<Value> = {
119
- /** What the field represents, and any rules for using it */
120
- description?: string;
121
- /**
122
- * JSON Schema for the field's value — the shape the model may write, at
123
- * creation and in later edits. Without one the model never writes the
124
- * field, like `ai.exclude`.
125
- */
126
- schema?: Record<string, any>;
127
- /**
128
- * What a field the model designs starts as. When set, the model places the
129
- * field and this value fills it; the model authors a value against `schema`
130
- * only when this is absent.
131
- */
132
- defaultValue?: Value;
133
- };
134
- /**
135
- * A user field type registered by the developer's config. Puck can't infer a
136
- * value shape for one, so a type carries `schema`, `defaultValue`, or both.
137
- */
138
- type AiFieldType$1<Value = AiFieldTypeValue> = AiFieldTypeShape<Value> & ({
139
- schema: Record<string, any>;
140
- } | {
141
- defaultValue: Value;
142
- });
143
- /**
144
- * Any JSON-ish value. Spelled out rather than `unknown` so a union with a
145
- * function form doesn't collapse, which would drop the callback's parameter
146
- * types at the call site.
147
- */
148
- type AiFieldTypeValue = string | number | boolean | null | readonly unknown[] | Record<string, unknown>;
149
118
  type AddOperation = {
150
119
  op: "add";
151
120
  id: string;
@@ -278,21 +247,6 @@ type PuckProviderMetadata = {
278
247
 
279
248
  type PuckMessage = UIMessage<PuckProviderMetadata, PuckDataParts>;
280
249
 
281
- type AiFieldTypeContext = {
282
- /** The designed component the field belongs to */
283
- componentName: string;
284
- /** The field's name within that component */
285
- fieldName: string;
286
- };
287
- /**
288
- * A field type the developer's config registers: `schema` is what the model
289
- * may write, `defaultValue` is what a designed field starts as — one or both.
290
- * In the editor the default may be a function of the component and field
291
- * being created.
292
- */
293
- type AiFieldType = AiFieldType$1<AiFieldTypeValue | ((ctx: AiFieldTypeContext) => AiFieldTypeValue)>;
294
- type AiFieldTypeRegistry = Record<string, AiFieldType>;
295
-
296
250
  type Mode = "assembly" | "design";
297
251
  type RequestOptions = {
298
252
  body?: {
@@ -309,13 +263,6 @@ type RequestOptions = {
309
263
  };
310
264
  type AiPluginProps = {
311
265
  host?: string;
312
- /**
313
- * Field types this config registers, keyed by field type. Each gives either
314
- * a `schema` the AI writes the value against, or a `defaultValue` every
315
- * field of the type starts with. Sent to the server as JSON, so a function
316
- * `defaultValue` only resolves in the editor.
317
- */
318
- fieldTypes?: AiFieldTypeRegistry;
319
266
  chat?: {
320
267
  attachments?: {
321
268
  enabled?: boolean;
package/dist/index.d.ts CHANGED
@@ -115,37 +115,6 @@ type DataToolStatus = {
115
115
  status: ToolStatus;
116
116
  toolCallId: string;
117
117
  };
118
- type AiFieldTypeShape<Value> = {
119
- /** What the field represents, and any rules for using it */
120
- description?: string;
121
- /**
122
- * JSON Schema for the field's value — the shape the model may write, at
123
- * creation and in later edits. Without one the model never writes the
124
- * field, like `ai.exclude`.
125
- */
126
- schema?: Record<string, any>;
127
- /**
128
- * What a field the model designs starts as. When set, the model places the
129
- * field and this value fills it; the model authors a value against `schema`
130
- * only when this is absent.
131
- */
132
- defaultValue?: Value;
133
- };
134
- /**
135
- * A user field type registered by the developer's config. Puck can't infer a
136
- * value shape for one, so a type carries `schema`, `defaultValue`, or both.
137
- */
138
- type AiFieldType$1<Value = AiFieldTypeValue> = AiFieldTypeShape<Value> & ({
139
- schema: Record<string, any>;
140
- } | {
141
- defaultValue: Value;
142
- });
143
- /**
144
- * Any JSON-ish value. Spelled out rather than `unknown` so a union with a
145
- * function form doesn't collapse, which would drop the callback's parameter
146
- * types at the call site.
147
- */
148
- type AiFieldTypeValue = string | number | boolean | null | readonly unknown[] | Record<string, unknown>;
149
118
  type AddOperation = {
150
119
  op: "add";
151
120
  id: string;
@@ -278,21 +247,6 @@ type PuckProviderMetadata = {
278
247
 
279
248
  type PuckMessage = UIMessage<PuckProviderMetadata, PuckDataParts>;
280
249
 
281
- type AiFieldTypeContext = {
282
- /** The designed component the field belongs to */
283
- componentName: string;
284
- /** The field's name within that component */
285
- fieldName: string;
286
- };
287
- /**
288
- * A field type the developer's config registers: `schema` is what the model
289
- * may write, `defaultValue` is what a designed field starts as — one or both.
290
- * In the editor the default may be a function of the component and field
291
- * being created.
292
- */
293
- type AiFieldType = AiFieldType$1<AiFieldTypeValue | ((ctx: AiFieldTypeContext) => AiFieldTypeValue)>;
294
- type AiFieldTypeRegistry = Record<string, AiFieldType>;
295
-
296
250
  type Mode = "assembly" | "design";
297
251
  type RequestOptions = {
298
252
  body?: {
@@ -309,13 +263,6 @@ type RequestOptions = {
309
263
  };
310
264
  type AiPluginProps = {
311
265
  host?: string;
312
- /**
313
- * Field types this config registers, keyed by field type. Each gives either
314
- * a `schema` the AI writes the value against, or a `defaultValue` every
315
- * field of the type starts with. Sent to the server as JSON, so a function
316
- * `defaultValue` only resolves in the editor.
317
- */
318
- fieldTypes?: AiFieldTypeRegistry;
319
266
  chat?: {
320
267
  attachments?: {
321
268
  enabled?: boolean;