@puckeditor/plugin-ai 0.6.1-canary.ee6f7b13 → 0.6.1-canary.f1d4df0c

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,4 +1,4 @@
1
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/Chat/styles.module.css/#css-module-data */
1
+ /* css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/Chat/styles.module.css/#css-module-data */
2
2
  ._Chat_3s08c_1 {
3
3
  background: white;
4
4
  height: 100%;
@@ -208,7 +208,7 @@ p {
208
208
  margin: 0;
209
209
  }
210
210
 
211
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/ActionModal/ActionModal.module.css/#css-module-data */
211
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/ActionModal/ActionModal.module.css/#css-module-data */
212
212
  ._ActionModal_r3pvy_1 {
213
213
  display: block;
214
214
  min-width: 356px;
@@ -235,7 +235,7 @@ p {
235
235
  padding: 16px 24px;
236
236
  }
237
237
 
238
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Modal/Modal.module.css/#css-module-data */
238
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Modal/Modal.module.css/#css-module-data */
239
239
  ._Modal-background_1bedq_1 {
240
240
  align-items: center;
241
241
  display: flex;
@@ -264,7 +264,7 @@ p {
264
264
  overflow: auto;
265
265
  }
266
266
 
267
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Button/Button.module.css/#css-module-data */
267
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Button/Button.module.css/#css-module-data */
268
268
  ._Button_1sk6w_1 {
269
269
  appearance: none;
270
270
  background: none;
@@ -397,7 +397,7 @@ p {
397
397
  padding-left: 8px;
398
398
  }
399
399
 
400
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Loader/styles.module.css/#css-module-data */
400
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Loader/styles.module.css/#css-module-data */
401
401
  @keyframes _loader-animation_nacdm_1 {
402
402
  0% {
403
403
  transform: rotate(0deg) scale(1);
@@ -419,7 +419,7 @@ p {
419
419
  animation-fill-mode: both;
420
420
  }
421
421
 
422
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Heading/Heading.module.css/#css-module-data */
422
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Heading/Heading.module.css/#css-module-data */
423
423
  ._Heading_qkzg9_1 {
424
424
  display: block;
425
425
  font-weight: 700;
@@ -487,7 +487,7 @@ p {
487
487
  }
488
488
  }
489
489
 
490
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Align/Align.module.css/#css-module-data */
490
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Align/Align.module.css/#css-module-data */
491
491
  ._Align_oewlu_1 {
492
492
  align-items: flex-start;
493
493
  display: flex;
@@ -511,7 +511,7 @@ p {
511
511
  position: relative;
512
512
  }
513
513
 
514
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/AutoForm/AutoForm.module.css/#css-module-data */
514
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/AutoForm/AutoForm.module.css/#css-module-data */
515
515
  ._AutoForm_1vmh9_1 {
516
516
  display: flex;
517
517
  gap: 16px;
@@ -522,7 +522,7 @@ p {
522
522
  padding: 0px !important;
523
523
  }
524
524
 
525
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Card/Card.module.css/#css-module-data */
525
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Card/Card.module.css/#css-module-data */
526
526
  ._Card_rpnal_1 {
527
527
  background-color: white;
528
528
  border: 1px solid var(--puck-color-grey-08);
@@ -562,7 +562,7 @@ p {
562
562
  color: var(--puck-color-azure-04);
563
563
  }
564
564
 
565
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/CardSelector/styles.module.css/#css-module-data */
565
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/CardSelector/styles.module.css/#css-module-data */
566
566
  ._CardSelector_1ogry_1 {
567
567
  display: grid;
568
568
  gap: 16px;
@@ -600,7 +600,7 @@ p {
600
600
  cursor: pointer;
601
601
  }
602
602
 
603
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Code/Code.module.css/#css-module-data */
603
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Code/Code.module.css/#css-module-data */
604
604
  ._Code_d4378_1 {
605
605
  border-radius: 8px;
606
606
  position: relative;
@@ -720,7 +720,7 @@ p {
720
720
  background: var(--puck-color-grey-11);
721
721
  }
722
722
 
723
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/IconButton/IconButton.module.css/#css-module-data */
723
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/IconButton/IconButton.module.css/#css-module-data */
724
724
  ._IconButton_thegm_1 {
725
725
  align-items: center;
726
726
  background: transparent;
@@ -765,7 +765,7 @@ p {
765
765
  color: var(--puck-color-grey-07);
766
766
  }
767
767
 
768
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/InfoBar/InfoBar.module.css/#css-module-data */
768
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/InfoBar/InfoBar.module.css/#css-module-data */
769
769
  ._InfoBar_kchdj_1 {
770
770
  border: 1px solid var(--puck-color-grey-10);
771
771
  border-radius: 8px;
@@ -788,7 +788,7 @@ p {
788
788
  font-weight: 600;
789
789
  }
790
790
 
791
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Inline/Inline.module.css/#css-module-data */
791
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Inline/Inline.module.css/#css-module-data */
792
792
  ._Inline_6o5on_3 {
793
793
  display: block;
794
794
  }
@@ -828,7 +828,7 @@ p {
828
828
  flex-grow: 1;
829
829
  }
830
830
 
831
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Link/Link.module.css/#css-module-data */
831
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Link/Link.module.css/#css-module-data */
832
832
  ._Link_1j70m_1 {
833
833
  color: var(--puck-color-azure-04);
834
834
  text-decoration: none;
@@ -837,7 +837,7 @@ p {
837
837
  color: var(--puck-color-azure-05);
838
838
  }
839
839
 
840
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Menu/styles.module.css/#css-module-data */
840
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Menu/styles.module.css/#css-module-data */
841
841
  ._Menu_1tu16_1 {
842
842
  display: flex;
843
843
  position: relative;
@@ -913,7 +913,7 @@ button._Menu-item_1tu16_55:hover {
913
913
  opacity: 0.5;
914
914
  }
915
915
 
916
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Page/Page.module.css/#css-module-data */
916
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Page/Page.module.css/#css-module-data */
917
917
  ._Page_nkzj9_1 {
918
918
  display: flex;
919
919
  flex-direction: column;
@@ -972,7 +972,7 @@ button._Menu-item_1tu16_55:hover {
972
972
  padding: 16px 24px;
973
973
  }
974
974
 
975
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Pagination/Pagination.module.css/#css-module-data */
975
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Pagination/Pagination.module.css/#css-module-data */
976
976
  ._Pagination_1okv2_1 {
977
977
  align-items: baseline;
978
978
  display: flex;
@@ -1000,7 +1000,7 @@ button._Menu-item_1tu16_55:hover {
1000
1000
  color: var(--puck-color-grey-05);
1001
1001
  }
1002
1002
 
1003
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/PlanGrid/styles.module.css/#css-module-data */
1003
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/PlanGrid/styles.module.css/#css-module-data */
1004
1004
  ._PlanGrid--loading_97rn7_1 {
1005
1005
  opacity: 0;
1006
1006
  }
@@ -1028,7 +1028,7 @@ button._Menu-item_1tu16_55:hover {
1028
1028
  font-weight: 500;
1029
1029
  }
1030
1030
 
1031
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/PlanCard/styles.module.css/#css-module-data */
1031
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/PlanCard/styles.module.css/#css-module-data */
1032
1032
  ._PlanCard_16zmu_1 {
1033
1033
  border: 1px solid var(--puck-color-grey-09);
1034
1034
  border-radius: 16px;
@@ -1212,7 +1212,7 @@ button._Menu-item_1tu16_55:hover {
1212
1212
  grid-auto-flow: column;
1213
1213
  }
1214
1214
 
1215
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Section/Section.module.css/#css-module-data */
1215
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Section/Section.module.css/#css-module-data */
1216
1216
  ._Section-inner_1uwo0_1 {
1217
1217
  margin-left: auto;
1218
1218
  margin-right: auto;
@@ -1230,7 +1230,7 @@ button._Menu-item_1tu16_55:hover {
1230
1230
  max-width: unset;
1231
1231
  }
1232
1232
 
1233
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Tag/Tag.module.css/#css-module-data */
1233
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Tag/Tag.module.css/#css-module-data */
1234
1234
  ._Tag_s2h0n_1 {
1235
1235
  align-items: center;
1236
1236
  display: flex;
@@ -1301,7 +1301,7 @@ button._Menu-item_1tu16_55:hover {
1301
1301
  margin-top: 1px;
1302
1302
  }
1303
1303
 
1304
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css/#css-module-data */
1304
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Table/Table.module.css/#css-module-data */
1305
1305
  ._Table_o345u_1 {
1306
1306
  color: black;
1307
1307
  display: flex;
@@ -1401,7 +1401,7 @@ button._Menu-item_1tu16_55:hover {
1401
1401
  background-color: var(--puck-color-grey-12);
1402
1402
  }
1403
1403
 
1404
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css/#css-module-data */
1404
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css/#css-module-data */
1405
1405
  ._VerticalSpace_1tjaw_1 {
1406
1406
  padding-top: 16px;
1407
1407
  }
@@ -1433,7 +1433,7 @@ button._Menu-item_1tu16_55:hover {
1433
1433
  padding-top: 128px;
1434
1434
  }
1435
1435
 
1436
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Viewport/styles.module.css/#css-module-data */
1436
+ /* css-module:/home/runner/work/platform/platform/packages/platform-client/components/Viewport/styles.module.css/#css-module-data */
1437
1437
  ._Viewport_1vvhm_3 {
1438
1438
  }
1439
1439
  ._Viewport--standard_1vvhm_6,
@@ -1468,7 +1468,7 @@ button._Menu-item_1tu16_55:hover {
1468
1468
  }
1469
1469
  }
1470
1470
 
1471
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/ChatBody/styles.module.css/#css-module-data */
1471
+ /* css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/ChatBody/styles.module.css/#css-module-data */
1472
1472
  ._Chat_1njo2_1 {
1473
1473
  --fade-size: 32px;
1474
1474
  --chat-background-color: white;
@@ -1699,7 +1699,7 @@ button._Menu-item_1tu16_55:hover {
1699
1699
  margin-left: auto;
1700
1700
  }
1701
1701
 
1702
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/PromptForm/styles.module.css/#css-module-data */
1702
+ /* css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/PromptForm/styles.module.css/#css-module-data */
1703
1703
  ._PromptForm_1r4kq_1 {
1704
1704
  --radius: 9px;
1705
1705
  background-color: var(--puck-color-grey-09);
package/dist/index.js CHANGED
@@ -564,7 +564,7 @@ var getClassNameFactory = (rootClass, styles, { baseClass = "" } = {}) => (optio
564
564
  };
565
565
  var get_class_name_factory_default = getClassNameFactory;
566
566
 
567
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/Chat/styles.module.css#css-module
567
+ // css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/Chat/styles.module.css#css-module
568
568
  init_react_import();
569
569
  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" };
570
570
 
@@ -583,7 +583,7 @@ init_react_import();
583
583
  // ../platform-client/components/ActionModal/ActionModal.tsx
584
584
  init_react_import();
585
585
 
586
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/ActionModal/ActionModal.module.css#css-module
586
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/ActionModal/ActionModal.module.css#css-module
587
587
  init_react_import();
588
588
  var ActionModal_module_default = { "ActionModal": "_ActionModal_r3pvy_1", "ActionModal-header": "_ActionModal-header_r3pvy_6", "ActionModal-body": "_ActionModal-body_r3pvy_17", "ActionModal-footer": "_ActionModal-footer_r3pvy_22" };
589
589
 
@@ -627,7 +627,7 @@ var get_class_name_factory_default2 = getClassNameFactory2;
627
627
  // ../platform-client/components/Modal/Modal.tsx
628
628
  init_react_import();
629
629
 
630
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Modal/Modal.module.css#css-module
630
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Modal/Modal.module.css#css-module
631
631
  init_react_import();
632
632
  var Modal_module_default = { "Modal-background": "_Modal-background_1bedq_1", "Modal--visible": "_Modal--visible_1bedq_16", "Modal-modal": "_Modal-modal_1bedq_22" };
633
633
 
@@ -645,14 +645,14 @@ init_react_import();
645
645
  init_react_import();
646
646
  var import_react8 = require("react");
647
647
 
648
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Button/Button.module.css#css-module
648
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Button/Button.module.css#css-module
649
649
  init_react_import();
650
650
  var Button_module_default = { "Button": "_Button_1sk6w_1", "Button--medium": "_Button--medium_1sk6w_34", "Button--large": "_Button--large_1sk6w_42", "Button--brand": "_Button--brand_1sk6w_49", "Button--primary": "_Button--primary_1sk6w_70", "Button--secondary": "_Button--secondary_1sk6w_84", "Button--danger": "_Button--danger_1sk6w_101", "Button--flush": "_Button--flush_1sk6w_115", "Button--ghost": "_Button--ghost_1sk6w_119", "Button--disabled": "_Button--disabled_1sk6w_136", "Button--fullWidth": "_Button--fullWidth_1sk6w_146", "Button-spinner": "_Button-spinner_1sk6w_151" };
651
651
 
652
652
  // ../platform-client/components/Loader/index.tsx
653
653
  init_react_import();
654
654
 
655
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Loader/styles.module.css#css-module
655
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Loader/styles.module.css#css-module
656
656
  init_react_import();
657
657
  var styles_module_default2 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
658
658
 
@@ -778,7 +778,7 @@ init_react_import();
778
778
  // ../platform-client/components/Heading/Heading.tsx
779
779
  init_react_import();
780
780
 
781
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Heading/Heading.module.css#css-module
781
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Heading/Heading.module.css#css-module
782
782
  init_react_import();
783
783
  var Heading_module_default = { "Heading": "_Heading_qkzg9_1", "Heading--xxxxl": "_Heading--xxxxl_qkzg9_11", "Heading--xxxl": "_Heading--xxxl_qkzg9_15", "Heading--xxl": "_Heading--xxl_qkzg9_19", "Heading--xl": "_Heading--xl_qkzg9_23", "Heading--l": "_Heading--l_qkzg9_27", "Heading--m": "_Heading--m_qkzg9_31", "Heading--s": "_Heading--s_qkzg9_35", "Heading--xs": "_Heading--xs_qkzg9_39", "Heading--xxs": "_Heading--xxs_qkzg9_43" };
784
784
 
@@ -832,7 +832,7 @@ init_react_import();
832
832
  init_react_import();
833
833
  var import_react10 = __toESM(require("react"));
834
834
 
835
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Align/Align.module.css#css-module
835
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Align/Align.module.css#css-module
836
836
  init_react_import();
837
837
  var Align_module_default = { "Align": "_Align_oewlu_1", "Align--horizontalCenter": "_Align--horizontalCenter_oewlu_7", "Align--horizontalRight": "_Align--horizontalRight_oewlu_11", "Align--verticalBottom": "_Align--verticalBottom_oewlu_15", "Align--verticalCenter": "_Align--verticalCenter_oewlu_20", "Align-item": "_Align-item_oewlu_25" };
838
838
 
@@ -856,7 +856,7 @@ init_react_import();
856
856
  var import_core = require("@puckeditor/core");
857
857
  var import_react11 = require("react");
858
858
 
859
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/AutoForm/AutoForm.module.css#css-module
859
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/AutoForm/AutoForm.module.css#css-module
860
860
  init_react_import();
861
861
  var AutoForm_module_default = { "AutoForm": "_AutoForm_1vmh9_1" };
862
862
 
@@ -870,7 +870,7 @@ init_react_import();
870
870
  // ../platform-client/components/Card/Card.tsx
871
871
  init_react_import();
872
872
 
873
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Card/Card.module.css#css-module
873
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Card/Card.module.css#css-module
874
874
  init_react_import();
875
875
  var Card_module_default = { "Card": "_Card_rpnal_1", "Card-body": "_Card-body_rpnal_17", "Card-title": "_Card-title_rpnal_23", "Card-subtitle": "_Card-subtitle_rpnal_27", "Card-chevron": "_Card-chevron_rpnal_32", "Card--showChevron": "_Card--showChevron_rpnal_38", "Card--isActive": "_Card--isActive_rpnal_42" };
876
876
 
@@ -881,7 +881,7 @@ var getClassName8 = get_class_name_factory_default2("Card", Card_module_default)
881
881
  // ../platform-client/components/CardSelector/index.tsx
882
882
  init_react_import();
883
883
 
884
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/CardSelector/styles.module.css#css-module
884
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/CardSelector/styles.module.css#css-module
885
885
  init_react_import();
886
886
  var styles_module_default3 = { "CardSelector": "_CardSelector_1ogry_1", "CardSelectorOption": "_CardSelectorOption_1ogry_12", "CardSelectorOption--isSelected": "_CardSelectorOption--isSelected_1ogry_23", "CardSelectorOption--disabled": "_CardSelectorOption--disabled_1ogry_27", "CardSelectorOption-description": "_CardSelectorOption-description_1ogry_31", "CardSelectorOption-body": "_CardSelectorOption-body_1ogry_35" };
887
887
 
@@ -896,7 +896,7 @@ init_react_import();
896
896
  // ../platform-client/components/Code/Code.tsx
897
897
  init_react_import();
898
898
 
899
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Code/Code.module.css#css-module
899
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Code/Code.module.css#css-module
900
900
  init_react_import();
901
901
  var Code_module_default = { "Code": "_Code_d4378_1", "Code-body": "_Code-body_d4378_8", "Code--light": "_Code--light_d4378_19", "Code-header": "_Code-header_d4378_34", "Code-corner": "_Code-corner_d4378_51", "Code-actions": "_Code-actions_d4378_71", "Code--lineNumbers": "_Code--lineNumbers_d4378_76", "Code-tabs": "_Code-tabs_d4378_91", "Tab": "_Tab_d4378_99", "Tab--isActive": "_Tab--isActive_d4378_104", "Tab--light": "_Tab--light_d4378_108", "Tab-button": "_Tab-button_d4378_112" };
902
902
 
@@ -918,7 +918,7 @@ init_react_import();
918
918
  init_react_import();
919
919
  var import_react14 = require("react");
920
920
 
921
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/IconButton/IconButton.module.css#css-module
921
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/IconButton/IconButton.module.css#css-module
922
922
  init_react_import();
923
923
  var IconButton_module_default = { "IconButton": "_IconButton_thegm_1", "IconButton--disabled": "_IconButton--disabled_thegm_20", "IconButton--dark": "_IconButton--dark_thegm_26", "IconButton-title": "_IconButton-title_thegm_37" };
924
924
 
@@ -983,7 +983,7 @@ init_react_import();
983
983
  // ../platform-client/components/InfoBar/InfoBar.tsx
984
984
  init_react_import();
985
985
 
986
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/InfoBar/InfoBar.module.css#css-module
986
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/InfoBar/InfoBar.module.css#css-module
987
987
  init_react_import();
988
988
  var InfoBar_module_default = { "InfoBar": "_InfoBar_kchdj_1", "Info": "_Info_kchdj_1", "Info-title": "_Info-title_kchdj_21" };
989
989
 
@@ -1008,7 +1008,7 @@ init_react_import();
1008
1008
  // ../platform-client/components/Inline/Inline.tsx
1009
1009
  init_react_import();
1010
1010
 
1011
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Inline/Inline.module.css#css-module
1011
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Inline/Inline.module.css#css-module
1012
1012
  init_react_import();
1013
1013
  var Inline_module_default = { "Inline": "_Inline_6o5on_3", "Inline-inner": "_Inline-inner_6o5on_7", "Inline--noWrap": "_Inline--noWrap_6o5on_12", "Inline--sizeNONE": "_Inline--sizeNONE_6o5on_16", "Inline--sizeXXS": "_Inline--sizeXXS_6o5on_20", "Inline--sizeXS": "_Inline--sizeXS_6o5on_24", "Inline--sizeS": "_Inline--sizeS_6o5on_28", "Inline--sizeM": "_Inline--sizeM_6o5on_32", "Inline--sizeL": "_Inline--sizeL_6o5on_36", "Inline--center": "_Inline--center_6o5on_40", "Inline--centerH": "_Inline--centerH_6o5on_44", "Inline--grow": "_Inline--grow_6o5on_48" };
1014
1014
 
@@ -1060,7 +1060,7 @@ init_react_import();
1060
1060
  // ../platform-client/components/Link/Link.tsx
1061
1061
  init_react_import();
1062
1062
 
1063
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Link/Link.module.css#css-module
1063
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Link/Link.module.css#css-module
1064
1064
  init_react_import();
1065
1065
  var Link_module_default = { "Link": "_Link_1j70m_1" };
1066
1066
 
@@ -1072,7 +1072,7 @@ var getClassName12 = get_class_name_factory_default2("Link", Link_module_default
1072
1072
  init_react_import();
1073
1073
  var import_react15 = require("react");
1074
1074
 
1075
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Menu/styles.module.css#css-module
1075
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Menu/styles.module.css#css-module
1076
1076
  init_react_import();
1077
1077
  var styles_module_default4 = { "Menu": "_Menu_1tu16_1", "Menu-content": "_Menu-content_1tu16_6", "Menu-sections": "_Menu-sections_1tu16_11", "Menu-action": "_Menu-action_1tu16_22", "Menu-list": "_Menu-list_1tu16_44", "Menu-item": "_Menu-item_1tu16_55", "Menu-item--disabled": "_Menu-item--disabled_1tu16_83" };
1078
1078
 
@@ -1090,7 +1090,7 @@ init_react_import();
1090
1090
  // ../platform-client/components/Page/Page.tsx
1091
1091
  init_react_import();
1092
1092
 
1093
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Page/Page.module.css#css-module
1093
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Page/Page.module.css#css-module
1094
1094
  init_react_import();
1095
1095
  var Page_module_default = { "Page": "_Page_nkzj9_1", "Page-masthead": "_Page-masthead_nkzj9_8", "Page-crumbs": "_Page-crumbs_nkzj9_18", "Page-crumb": "_Page-crumb_nkzj9_18", "Page-crumbLink": "_Page-crumbLink_nkzj9_29", "Page-actions": "_Page-actions_nkzj9_61", "Page-footer": "_Page-footer_nkzj9_65" };
1096
1096
 
@@ -1105,7 +1105,7 @@ init_react_import();
1105
1105
  init_react_import();
1106
1106
  var import_react16 = require("react");
1107
1107
 
1108
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Pagination/Pagination.module.css#css-module
1108
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Pagination/Pagination.module.css#css-module
1109
1109
  init_react_import();
1110
1110
  var Pagination_module_default = { "Pagination": "_Pagination_1okv2_1", "PaginationButton": "_PaginationButton_1okv2_8", "PaginationButton--isActive": "_PaginationButton--isActive_1okv2_20", "Pagination-ellipsis": "_Pagination-ellipsis_1okv2_30" };
1111
1111
 
@@ -1117,14 +1117,14 @@ var cxButton = getClassNameFactory2("PaginationButton", Pagination_module_defaul
1117
1117
  // ../platform-client/components/PlanGrid/index.tsx
1118
1118
  init_react_import();
1119
1119
 
1120
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/PlanGrid/styles.module.css#css-module
1120
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/PlanGrid/styles.module.css#css-module
1121
1121
  init_react_import();
1122
1122
  var styles_module_default5 = { "PlanGrid--loading": "_PlanGrid--loading_97rn7_1", "PlanGrid-grid": "_PlanGrid-grid_97rn7_5", "PlanGrid-enterprise": "_PlanGrid-enterprise_97rn7_16" };
1123
1123
 
1124
1124
  // ../platform-client/components/PlanCard/index.tsx
1125
1125
  init_react_import();
1126
1126
 
1127
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/PlanCard/styles.module.css#css-module
1127
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/PlanCard/styles.module.css#css-module
1128
1128
  init_react_import();
1129
1129
  var styles_module_default6 = { "PlanCard": "_PlanCard_16zmu_1", "PlanCard--enterprise": "_PlanCard--enterprise_16zmu_12", "PlanCard-title": "_PlanCard-title_16zmu_17", "PlanCard-header": "_PlanCard-header_16zmu_26", "PlanCard-features": "_PlanCard-features_16zmu_35", "PlanCard-feature": "_PlanCard-feature_16zmu_35", "PlanCard-featureIcon": "_PlanCard-featureIcon_16zmu_51", "PlanCard-featureTitle": "_PlanCard-featureTitle_16zmu_56", "PlanCard-priceValue": "_PlanCard-priceValue_16zmu_61", "PlanCard-priceInterval": "_PlanCard-priceInterval_16zmu_65", "PlanCard-body": "_PlanCard-body_16zmu_69", "PlanCard-section": "_PlanCard-section_16zmu_83", "PlanCard-sectionTitle": "_PlanCard-sectionTitle_16zmu_106", "PlanCard-sectionBody": "_PlanCard-sectionBody_16zmu_112", "PlanCard-usageItem": "_PlanCard-usageItem_16zmu_125", "PlanCard-usageLabel": "_PlanCard-usageLabel_16zmu_131", "PlanCard-usageValue": "_PlanCard-usageValue_16zmu_136", "PlanCard-action": "_PlanCard-action_16zmu_142", "PlanCard-description": "_PlanCard-description_16zmu_149", "PlanCard--highlight": "_PlanCard--highlight_16zmu_154", "PlanCard-highlightText": "_PlanCard-highlightText_16zmu_184", "PlanCard--fullWidth": "_PlanCard--fullWidth_16zmu_200" };
1130
1130
 
@@ -6096,7 +6096,7 @@ init_react_import();
6096
6096
  // ../platform-client/components/Section/Section.tsx
6097
6097
  init_react_import();
6098
6098
 
6099
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Section/Section.module.css#css-module
6099
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Section/Section.module.css#css-module
6100
6100
  init_react_import();
6101
6101
  var Section_module_default = { "Section-inner": "_Section-inner_1uwo0_1", "Section--flush": "_Section--flush_1uwo0_8", "Section": "_Section_1uwo0_1", "Section--full": "_Section--full_1uwo0_17" };
6102
6102
 
@@ -6116,7 +6116,7 @@ init_react_import();
6116
6116
  // ../platform-client/components/Tag/Tag.tsx
6117
6117
  init_react_import();
6118
6118
 
6119
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Tag/Tag.module.css#css-module
6119
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Tag/Tag.module.css#css-module
6120
6120
  init_react_import();
6121
6121
  var Tag_module_default = { "Tag": "_Tag_s2h0n_1", "Tag--borderless": "_Tag--borderless_s2h0n_21", "Tag--colorBlue": "_Tag--colorBlue_s2h0n_25", "Tag--colorGreen": "_Tag--colorGreen_s2h0n_29", "Tag--colorRed": "_Tag--colorRed_s2h0n_33", "Tag--colorMuted": "_Tag--colorMuted_s2h0n_37", "Tag-sprite": "_Tag-sprite_s2h0n_41", "Tag--pulse": "_Tag--pulse_s2h0n_45", "pulse": "_pulse_s2h0n_1", "Tag-label": "_Tag-label_s2h0n_79" };
6122
6122
 
@@ -6134,7 +6134,7 @@ init_react_import();
6134
6134
  init_react_import();
6135
6135
  var import_react19 = require("react");
6136
6136
 
6137
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css#css-module
6137
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Table/Table.module.css#css-module
6138
6138
  init_react_import();
6139
6139
  var Table_module_default = { "Table": "_Table_o345u_1", "Table-filters": "_Table-filters_o345u_9", "Table-inner": "_Table-inner_o345u_13", "Table-table": "_Table-table_o345u_17", "Table--hideHeader": "_Table--hideHeader_o345u_41", "Table-footer": "_Table-footer_o345u_89", "Table--clickableRows": "_Table--clickableRows_o345u_93", "Table-placeholder": "_Table-placeholder_o345u_98", "Table-loader": "_Table-loader_o345u_110", "TableRow--highlightRow": "_TableRow--highlightRow_o345u_114" };
6140
6140
 
@@ -6153,7 +6153,7 @@ init_react_import();
6153
6153
  // ../platform-client/components/VerticalSpace/VerticalSpace.tsx
6154
6154
  init_react_import();
6155
6155
 
6156
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css#css-module
6156
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css#css-module
6157
6157
  init_react_import();
6158
6158
  var VerticalSpace_module_default = { "VerticalSpace": "_VerticalSpace_1tjaw_1", "VerticalSpace--size4": "_VerticalSpace--size4_1tjaw_5", "VerticalSpace--size8": "_VerticalSpace--size8_1tjaw_9", "VerticalSpace--size16": "_VerticalSpace--size16_1tjaw_13", "VerticalSpace--size32": "_VerticalSpace--size32_1tjaw_17", "VerticalSpace--size40": "_VerticalSpace--size40_1tjaw_21", "VerticalSpace--size48": "_VerticalSpace--size48_1tjaw_25", "VerticalSpace--size56": "_VerticalSpace--size56_1tjaw_29", "VerticalSpace--size96": "_VerticalSpace--size96_1tjaw_33", "VerticalSpace--size128": "_VerticalSpace--size128_1tjaw_37" };
6159
6159
 
@@ -6164,7 +6164,7 @@ var getClassName17 = get_class_name_factory_default2("VerticalSpace", VerticalSp
6164
6164
  // ../platform-client/components/Viewport/index.tsx
6165
6165
  init_react_import();
6166
6166
 
6167
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Viewport/styles.module.css#css-module
6167
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Viewport/styles.module.css#css-module
6168
6168
  init_react_import();
6169
6169
  var styles_module_default7 = { "Viewport": "_Viewport_1vvhm_3", "Viewport--standard": "_Viewport--standard_1vvhm_6", "Viewport--inline": "_Viewport--inline_1vvhm_7", "Viewport--narrow": "_Viewport--narrow_1vvhm_11", "Viewport--flex": "_Viewport--flex_1vvhm_19" };
6170
6170
 
@@ -6178,7 +6178,7 @@ var import_react20 = require("react");
6178
6178
  var import_jsx_runtime28 = require("react/jsx-runtime");
6179
6179
  var ctx = (0, import_react20.createContext)({});
6180
6180
 
6181
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/ChatBody/styles.module.css#css-module
6181
+ // css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/ChatBody/styles.module.css#css-module
6182
6182
  init_react_import();
6183
6183
  var styles_module_default8 = { "Chat": "_Chat_1njo2_1", "Chat-inner": "_Chat-inner_1njo2_17", "Chat--hasMessages": "_Chat--hasMessages_1njo2_25", "Chat--hasChildren": "_Chat--hasChildren_1njo2_29", "Chat-messages": "_Chat-messages_1njo2_34", "Chat-form": "_Chat-form_1njo2_41", "Chat--hideInput": "_Chat--hideInput_1njo2_46", "Chat-formHelper": "_Chat-formHelper_1njo2_60", "Chat-examplePrompts": "_Chat-examplePrompts_1njo2_75", "Chat-examplePrompt": "_Chat-examplePrompt_1njo2_75", "Chat-examplePromptArrow": "_Chat-examplePromptArrow_1njo2_105", "Chat-default": "_Chat-default_1njo2_110", "ChatMessage": "_ChatMessage_1njo2_127", "ChatMessage--userRole": "_ChatMessage--userRole_1njo2_133", "ChatMessage-text": "_ChatMessage-text_1njo2_133", "ChatMessage-data": "_ChatMessage-data_1njo2_231", "ChatMessage-dataInner": "_ChatMessage-dataInner_1njo2_242", "ChatMessage-dataIcon": "_ChatMessage-dataIcon_1njo2_248", "Chat-loader": "_Chat-loader_1njo2_252", "Chat-error": "_Chat-error_1njo2_257", "Chat-errorLabel": "_Chat-errorLabel_1njo2_266", "Chat-errorAction": "_Chat-errorAction_1njo2_270" };
6184
6184
 
@@ -6186,7 +6186,7 @@ var styles_module_default8 = { "Chat": "_Chat_1njo2_1", "Chat-inner": "_Chat-inn
6186
6186
  init_react_import();
6187
6187
  var import_react21 = require("react");
6188
6188
 
6189
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/PromptForm/styles.module.css#css-module
6189
+ // css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/PromptForm/styles.module.css#css-module
6190
6190
  init_react_import();
6191
6191
  var styles_module_default9 = { "PromptForm": "_PromptForm_1r4kq_1", "PromptForm-inner": "_PromptForm-inner_1r4kq_8", "PromptForm--dark": "_PromptForm--dark_1r4kq_14", "PromptForm--glow": "_PromptForm--glow_1r4kq_19", "PromptForm-glow": "_PromptForm-glow_1r4kq_19", "loop": "_loop_1r4kq_1", "PromptForm-formInner": "_PromptForm-formInner_1r4kq_60", "PromptForm-input": "_PromptForm-input_1r4kq_66", "PromptForm--disabled": "_PromptForm--disabled_1r4kq_97", "PromptForm-helper": "_PromptForm-helper_1r4kq_102", "PromptForm-actions": "_PromptForm-actions_1r4kq_112", "PromptForm-actionsLeft": "_PromptForm-actionsLeft_1r4kq_123", "PromptForm-actionsRight": "_PromptForm-actionsRight_1r4kq_130", "PromptForm-actionSubmit": "_PromptForm-actionSubmit_1r4kq_135", "PromptForm--userCta": "_PromptForm--userCta_1r4kq_149", "PromptForm--isDisabled": "_PromptForm--isDisabled_1r4kq_157", "PromptForm--isLoading": "_PromptForm--isLoading_1r4kq_162" };
6192
6192
 
@@ -6656,29 +6656,39 @@ function Chat2({
6656
6656
  const [toolStatus, setToolStatus] = (0, import_react25.useState)({});
6657
6657
  const uploadScreenshot = (0, import_react25.useCallback)(
6658
6658
  async (width, bucketUrl) => {
6659
- const iframeDocument = document?.getElementById("preview-frame")?.contentDocument?.documentElement ?? null;
6660
- if (!iframeDocument) return;
6661
- const canvas = await (0, import_html2canvas_pro.default)(iframeDocument, {
6662
- scale: 2,
6663
- backgroundColor: "#ffffff",
6664
- width,
6665
- windowWidth: width,
6666
- foreignObjectRendering: false,
6667
- imageTimeout: 3e4,
6668
- logging: false,
6669
- allowTaint: false,
6670
- useCORS: true,
6671
- scrollY: 0,
6672
- ignoreElements: (el) => Array.from(el.classList).some(
6673
- (c2) => c2.startsWith("_DraggableComponent--hover") || c2.startsWith("_ActionBar")
6674
- )
6675
- });
6676
- const image = canvas.toDataURL("image/webp", 0.8);
6677
- const blob = await (await fetch(image)).blob();
6678
- await fetch(bucketUrl, {
6679
- method: "PUT",
6680
- body: blob
6681
- });
6659
+ try {
6660
+ const iframeDocument = document?.getElementById("preview-frame")?.contentDocument?.documentElement ?? null;
6661
+ if (!iframeDocument) {
6662
+ throw new Error("Preview frame not found");
6663
+ }
6664
+ const canvas = await (0, import_html2canvas_pro.default)(iframeDocument, {
6665
+ scale: 2,
6666
+ backgroundColor: "#ffffff",
6667
+ width,
6668
+ windowWidth: width,
6669
+ foreignObjectRendering: false,
6670
+ imageTimeout: 3e4,
6671
+ logging: false,
6672
+ allowTaint: false,
6673
+ useCORS: true,
6674
+ scrollY: 0,
6675
+ ignoreElements: (el) => Array.from(el.classList).some(
6676
+ (c2) => c2.startsWith("_DraggableComponent--hover") || c2.startsWith("_ActionBar")
6677
+ )
6678
+ });
6679
+ const image = canvas.toDataURL("image/webp", 0.8);
6680
+ const imageResponse = await fetch(image);
6681
+ const blob = await imageResponse.blob();
6682
+ const uploadResponse = await fetch(bucketUrl, {
6683
+ method: "PUT",
6684
+ body: blob
6685
+ });
6686
+ if (!uploadResponse.ok) {
6687
+ throw new Error(`Upload failed with status ${uploadResponse.status}`);
6688
+ }
6689
+ } catch (e2) {
6690
+ console.error("Failed to upload screenshot", e2);
6691
+ }
6682
6692
  },
6683
6693
  []
6684
6694
  );
@@ -6723,7 +6733,7 @@ function Chat2({
6723
6733
  return;
6724
6734
  }
6725
6735
  case "data-send-screenshot": {
6726
- dataPart.data.urls.map((obj) => {
6736
+ dataPart.data.urls.forEach((obj) => {
6727
6737
  const [[key, value]] = Object.entries(obj);
6728
6738
  const breakpoint = Number(key);
6729
6739
  uploadScreenshot(breakpoint, value);
@@ -6735,7 +6745,7 @@ function Chat2({
6735
6745
  return;
6736
6746
  }
6737
6747
  },
6738
- [getPuck]
6748
+ [getPuck, puckDispatch, uploadScreenshot]
6739
6749
  );
6740
6750
  const { messages, status, sendMessage, regenerate, setMessages } = useChat({
6741
6751
  generateId: () => prefixedUlid("msg"),
package/dist/index.mjs CHANGED
@@ -559,7 +559,7 @@ var getClassNameFactory = (rootClass, styles, { baseClass = "" } = {}) => (optio
559
559
  };
560
560
  var get_class_name_factory_default = getClassNameFactory;
561
561
 
562
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/Chat/styles.module.css#css-module
562
+ // css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/Chat/styles.module.css#css-module
563
563
  init_react_import();
564
564
  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" };
565
565
 
@@ -580,7 +580,7 @@ init_react_import();
580
580
  // ../platform-client/components/ActionModal/ActionModal.tsx
581
581
  init_react_import();
582
582
 
583
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/ActionModal/ActionModal.module.css#css-module
583
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/ActionModal/ActionModal.module.css#css-module
584
584
  init_react_import();
585
585
  var ActionModal_module_default = { "ActionModal": "_ActionModal_r3pvy_1", "ActionModal-header": "_ActionModal-header_r3pvy_6", "ActionModal-body": "_ActionModal-body_r3pvy_17", "ActionModal-footer": "_ActionModal-footer_r3pvy_22" };
586
586
 
@@ -624,7 +624,7 @@ var get_class_name_factory_default2 = getClassNameFactory2;
624
624
  // ../platform-client/components/Modal/Modal.tsx
625
625
  init_react_import();
626
626
 
627
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Modal/Modal.module.css#css-module
627
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Modal/Modal.module.css#css-module
628
628
  init_react_import();
629
629
  var Modal_module_default = { "Modal-background": "_Modal-background_1bedq_1", "Modal--visible": "_Modal--visible_1bedq_16", "Modal-modal": "_Modal-modal_1bedq_22" };
630
630
 
@@ -642,14 +642,14 @@ init_react_import();
642
642
  init_react_import();
643
643
  import { useEffect as useEffect4, useState as useState4 } from "react";
644
644
 
645
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Button/Button.module.css#css-module
645
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Button/Button.module.css#css-module
646
646
  init_react_import();
647
647
  var Button_module_default = { "Button": "_Button_1sk6w_1", "Button--medium": "_Button--medium_1sk6w_34", "Button--large": "_Button--large_1sk6w_42", "Button--brand": "_Button--brand_1sk6w_49", "Button--primary": "_Button--primary_1sk6w_70", "Button--secondary": "_Button--secondary_1sk6w_84", "Button--danger": "_Button--danger_1sk6w_101", "Button--flush": "_Button--flush_1sk6w_115", "Button--ghost": "_Button--ghost_1sk6w_119", "Button--disabled": "_Button--disabled_1sk6w_136", "Button--fullWidth": "_Button--fullWidth_1sk6w_146", "Button-spinner": "_Button-spinner_1sk6w_151" };
648
648
 
649
649
  // ../platform-client/components/Loader/index.tsx
650
650
  init_react_import();
651
651
 
652
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Loader/styles.module.css#css-module
652
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Loader/styles.module.css#css-module
653
653
  init_react_import();
654
654
  var styles_module_default2 = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
655
655
 
@@ -775,7 +775,7 @@ init_react_import();
775
775
  // ../platform-client/components/Heading/Heading.tsx
776
776
  init_react_import();
777
777
 
778
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Heading/Heading.module.css#css-module
778
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Heading/Heading.module.css#css-module
779
779
  init_react_import();
780
780
  var Heading_module_default = { "Heading": "_Heading_qkzg9_1", "Heading--xxxxl": "_Heading--xxxxl_qkzg9_11", "Heading--xxxl": "_Heading--xxxl_qkzg9_15", "Heading--xxl": "_Heading--xxl_qkzg9_19", "Heading--xl": "_Heading--xl_qkzg9_23", "Heading--l": "_Heading--l_qkzg9_27", "Heading--m": "_Heading--m_qkzg9_31", "Heading--s": "_Heading--s_qkzg9_35", "Heading--xs": "_Heading--xs_qkzg9_39", "Heading--xxs": "_Heading--xxs_qkzg9_43" };
781
781
 
@@ -829,7 +829,7 @@ init_react_import();
829
829
  init_react_import();
830
830
  import React2 from "react";
831
831
 
832
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Align/Align.module.css#css-module
832
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Align/Align.module.css#css-module
833
833
  init_react_import();
834
834
  var Align_module_default = { "Align": "_Align_oewlu_1", "Align--horizontalCenter": "_Align--horizontalCenter_oewlu_7", "Align--horizontalRight": "_Align--horizontalRight_oewlu_11", "Align--verticalBottom": "_Align--verticalBottom_oewlu_15", "Align--verticalCenter": "_Align--verticalCenter_oewlu_20", "Align-item": "_Align-item_oewlu_25" };
835
835
 
@@ -853,7 +853,7 @@ init_react_import();
853
853
  import { AutoField, FieldLabel } from "@puckeditor/core";
854
854
  import { useEffect as useEffect5, useRef as useRef5, useState as useState5 } from "react";
855
855
 
856
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/AutoForm/AutoForm.module.css#css-module
856
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/AutoForm/AutoForm.module.css#css-module
857
857
  init_react_import();
858
858
  var AutoForm_module_default = { "AutoForm": "_AutoForm_1vmh9_1" };
859
859
 
@@ -867,7 +867,7 @@ init_react_import();
867
867
  // ../platform-client/components/Card/Card.tsx
868
868
  init_react_import();
869
869
 
870
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Card/Card.module.css#css-module
870
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Card/Card.module.css#css-module
871
871
  init_react_import();
872
872
  var Card_module_default = { "Card": "_Card_rpnal_1", "Card-body": "_Card-body_rpnal_17", "Card-title": "_Card-title_rpnal_23", "Card-subtitle": "_Card-subtitle_rpnal_27", "Card-chevron": "_Card-chevron_rpnal_32", "Card--showChevron": "_Card--showChevron_rpnal_38", "Card--isActive": "_Card--isActive_rpnal_42" };
873
873
 
@@ -878,7 +878,7 @@ var getClassName8 = get_class_name_factory_default2("Card", Card_module_default)
878
878
  // ../platform-client/components/CardSelector/index.tsx
879
879
  init_react_import();
880
880
 
881
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/CardSelector/styles.module.css#css-module
881
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/CardSelector/styles.module.css#css-module
882
882
  init_react_import();
883
883
  var styles_module_default3 = { "CardSelector": "_CardSelector_1ogry_1", "CardSelectorOption": "_CardSelectorOption_1ogry_12", "CardSelectorOption--isSelected": "_CardSelectorOption--isSelected_1ogry_23", "CardSelectorOption--disabled": "_CardSelectorOption--disabled_1ogry_27", "CardSelectorOption-description": "_CardSelectorOption-description_1ogry_31", "CardSelectorOption-body": "_CardSelectorOption-body_1ogry_35" };
884
884
 
@@ -893,7 +893,7 @@ init_react_import();
893
893
  // ../platform-client/components/Code/Code.tsx
894
894
  init_react_import();
895
895
 
896
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Code/Code.module.css#css-module
896
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Code/Code.module.css#css-module
897
897
  init_react_import();
898
898
  var Code_module_default = { "Code": "_Code_d4378_1", "Code-body": "_Code-body_d4378_8", "Code--light": "_Code--light_d4378_19", "Code-header": "_Code-header_d4378_34", "Code-corner": "_Code-corner_d4378_51", "Code-actions": "_Code-actions_d4378_71", "Code--lineNumbers": "_Code--lineNumbers_d4378_76", "Code-tabs": "_Code-tabs_d4378_91", "Tab": "_Tab_d4378_99", "Tab--isActive": "_Tab--isActive_d4378_104", "Tab--light": "_Tab--light_d4378_108", "Tab-button": "_Tab-button_d4378_112" };
899
899
 
@@ -915,7 +915,7 @@ init_react_import();
915
915
  init_react_import();
916
916
  import { useState as useState8 } from "react";
917
917
 
918
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/IconButton/IconButton.module.css#css-module
918
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/IconButton/IconButton.module.css#css-module
919
919
  init_react_import();
920
920
  var IconButton_module_default = { "IconButton": "_IconButton_thegm_1", "IconButton--disabled": "_IconButton--disabled_thegm_20", "IconButton--dark": "_IconButton--dark_thegm_26", "IconButton-title": "_IconButton-title_thegm_37" };
921
921
 
@@ -980,7 +980,7 @@ init_react_import();
980
980
  // ../platform-client/components/InfoBar/InfoBar.tsx
981
981
  init_react_import();
982
982
 
983
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/InfoBar/InfoBar.module.css#css-module
983
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/InfoBar/InfoBar.module.css#css-module
984
984
  init_react_import();
985
985
  var InfoBar_module_default = { "InfoBar": "_InfoBar_kchdj_1", "Info": "_Info_kchdj_1", "Info-title": "_Info-title_kchdj_21" };
986
986
 
@@ -1005,7 +1005,7 @@ init_react_import();
1005
1005
  // ../platform-client/components/Inline/Inline.tsx
1006
1006
  init_react_import();
1007
1007
 
1008
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Inline/Inline.module.css#css-module
1008
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Inline/Inline.module.css#css-module
1009
1009
  init_react_import();
1010
1010
  var Inline_module_default = { "Inline": "_Inline_6o5on_3", "Inline-inner": "_Inline-inner_6o5on_7", "Inline--noWrap": "_Inline--noWrap_6o5on_12", "Inline--sizeNONE": "_Inline--sizeNONE_6o5on_16", "Inline--sizeXXS": "_Inline--sizeXXS_6o5on_20", "Inline--sizeXS": "_Inline--sizeXS_6o5on_24", "Inline--sizeS": "_Inline--sizeS_6o5on_28", "Inline--sizeM": "_Inline--sizeM_6o5on_32", "Inline--sizeL": "_Inline--sizeL_6o5on_36", "Inline--center": "_Inline--center_6o5on_40", "Inline--centerH": "_Inline--centerH_6o5on_44", "Inline--grow": "_Inline--grow_6o5on_48" };
1011
1011
 
@@ -1057,7 +1057,7 @@ init_react_import();
1057
1057
  // ../platform-client/components/Link/Link.tsx
1058
1058
  init_react_import();
1059
1059
 
1060
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Link/Link.module.css#css-module
1060
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Link/Link.module.css#css-module
1061
1061
  init_react_import();
1062
1062
  var Link_module_default = { "Link": "_Link_1j70m_1" };
1063
1063
 
@@ -1069,7 +1069,7 @@ var getClassName12 = get_class_name_factory_default2("Link", Link_module_default
1069
1069
  init_react_import();
1070
1070
  import { useState as useState9 } from "react";
1071
1071
 
1072
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Menu/styles.module.css#css-module
1072
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Menu/styles.module.css#css-module
1073
1073
  init_react_import();
1074
1074
  var styles_module_default4 = { "Menu": "_Menu_1tu16_1", "Menu-content": "_Menu-content_1tu16_6", "Menu-sections": "_Menu-sections_1tu16_11", "Menu-action": "_Menu-action_1tu16_22", "Menu-list": "_Menu-list_1tu16_44", "Menu-item": "_Menu-item_1tu16_55", "Menu-item--disabled": "_Menu-item--disabled_1tu16_83" };
1075
1075
 
@@ -1087,7 +1087,7 @@ init_react_import();
1087
1087
  // ../platform-client/components/Page/Page.tsx
1088
1088
  init_react_import();
1089
1089
 
1090
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Page/Page.module.css#css-module
1090
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Page/Page.module.css#css-module
1091
1091
  init_react_import();
1092
1092
  var Page_module_default = { "Page": "_Page_nkzj9_1", "Page-masthead": "_Page-masthead_nkzj9_8", "Page-crumbs": "_Page-crumbs_nkzj9_18", "Page-crumb": "_Page-crumb_nkzj9_18", "Page-crumbLink": "_Page-crumbLink_nkzj9_29", "Page-actions": "_Page-actions_nkzj9_61", "Page-footer": "_Page-footer_nkzj9_65" };
1093
1093
 
@@ -1102,7 +1102,7 @@ init_react_import();
1102
1102
  init_react_import();
1103
1103
  import { useMemo } from "react";
1104
1104
 
1105
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Pagination/Pagination.module.css#css-module
1105
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Pagination/Pagination.module.css#css-module
1106
1106
  init_react_import();
1107
1107
  var Pagination_module_default = { "Pagination": "_Pagination_1okv2_1", "PaginationButton": "_PaginationButton_1okv2_8", "PaginationButton--isActive": "_PaginationButton--isActive_1okv2_20", "Pagination-ellipsis": "_Pagination-ellipsis_1okv2_30" };
1108
1108
 
@@ -1114,14 +1114,14 @@ var cxButton = getClassNameFactory2("PaginationButton", Pagination_module_defaul
1114
1114
  // ../platform-client/components/PlanGrid/index.tsx
1115
1115
  init_react_import();
1116
1116
 
1117
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/PlanGrid/styles.module.css#css-module
1117
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/PlanGrid/styles.module.css#css-module
1118
1118
  init_react_import();
1119
1119
  var styles_module_default5 = { "PlanGrid--loading": "_PlanGrid--loading_97rn7_1", "PlanGrid-grid": "_PlanGrid-grid_97rn7_5", "PlanGrid-enterprise": "_PlanGrid-enterprise_97rn7_16" };
1120
1120
 
1121
1121
  // ../platform-client/components/PlanCard/index.tsx
1122
1122
  init_react_import();
1123
1123
 
1124
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/PlanCard/styles.module.css#css-module
1124
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/PlanCard/styles.module.css#css-module
1125
1125
  init_react_import();
1126
1126
  var styles_module_default6 = { "PlanCard": "_PlanCard_16zmu_1", "PlanCard--enterprise": "_PlanCard--enterprise_16zmu_12", "PlanCard-title": "_PlanCard-title_16zmu_17", "PlanCard-header": "_PlanCard-header_16zmu_26", "PlanCard-features": "_PlanCard-features_16zmu_35", "PlanCard-feature": "_PlanCard-feature_16zmu_35", "PlanCard-featureIcon": "_PlanCard-featureIcon_16zmu_51", "PlanCard-featureTitle": "_PlanCard-featureTitle_16zmu_56", "PlanCard-priceValue": "_PlanCard-priceValue_16zmu_61", "PlanCard-priceInterval": "_PlanCard-priceInterval_16zmu_65", "PlanCard-body": "_PlanCard-body_16zmu_69", "PlanCard-section": "_PlanCard-section_16zmu_83", "PlanCard-sectionTitle": "_PlanCard-sectionTitle_16zmu_106", "PlanCard-sectionBody": "_PlanCard-sectionBody_16zmu_112", "PlanCard-usageItem": "_PlanCard-usageItem_16zmu_125", "PlanCard-usageLabel": "_PlanCard-usageLabel_16zmu_131", "PlanCard-usageValue": "_PlanCard-usageValue_16zmu_136", "PlanCard-action": "_PlanCard-action_16zmu_142", "PlanCard-description": "_PlanCard-description_16zmu_149", "PlanCard--highlight": "_PlanCard--highlight_16zmu_154", "PlanCard-highlightText": "_PlanCard-highlightText_16zmu_184", "PlanCard--fullWidth": "_PlanCard--fullWidth_16zmu_200" };
1127
1127
 
@@ -6093,7 +6093,7 @@ init_react_import();
6093
6093
  // ../platform-client/components/Section/Section.tsx
6094
6094
  init_react_import();
6095
6095
 
6096
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Section/Section.module.css#css-module
6096
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Section/Section.module.css#css-module
6097
6097
  init_react_import();
6098
6098
  var Section_module_default = { "Section-inner": "_Section-inner_1uwo0_1", "Section--flush": "_Section--flush_1uwo0_8", "Section": "_Section_1uwo0_1", "Section--full": "_Section--full_1uwo0_17" };
6099
6099
 
@@ -6113,7 +6113,7 @@ init_react_import();
6113
6113
  // ../platform-client/components/Tag/Tag.tsx
6114
6114
  init_react_import();
6115
6115
 
6116
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Tag/Tag.module.css#css-module
6116
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Tag/Tag.module.css#css-module
6117
6117
  init_react_import();
6118
6118
  var Tag_module_default = { "Tag": "_Tag_s2h0n_1", "Tag--borderless": "_Tag--borderless_s2h0n_21", "Tag--colorBlue": "_Tag--colorBlue_s2h0n_25", "Tag--colorGreen": "_Tag--colorGreen_s2h0n_29", "Tag--colorRed": "_Tag--colorRed_s2h0n_33", "Tag--colorMuted": "_Tag--colorMuted_s2h0n_37", "Tag-sprite": "_Tag-sprite_s2h0n_41", "Tag--pulse": "_Tag--pulse_s2h0n_45", "pulse": "_pulse_s2h0n_1", "Tag-label": "_Tag-label_s2h0n_79" };
6119
6119
 
@@ -6131,7 +6131,7 @@ init_react_import();
6131
6131
  init_react_import();
6132
6132
  import { useEffect as useEffect8, useMemo as useMemo3, useRef as useRef7, useState as useState11 } from "react";
6133
6133
 
6134
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css#css-module
6134
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Table/Table.module.css#css-module
6135
6135
  init_react_import();
6136
6136
  var Table_module_default = { "Table": "_Table_o345u_1", "Table-filters": "_Table-filters_o345u_9", "Table-inner": "_Table-inner_o345u_13", "Table-table": "_Table-table_o345u_17", "Table--hideHeader": "_Table--hideHeader_o345u_41", "Table-footer": "_Table-footer_o345u_89", "Table--clickableRows": "_Table--clickableRows_o345u_93", "Table-placeholder": "_Table-placeholder_o345u_98", "Table-loader": "_Table-loader_o345u_110", "TableRow--highlightRow": "_TableRow--highlightRow_o345u_114" };
6137
6137
 
@@ -6150,7 +6150,7 @@ init_react_import();
6150
6150
  // ../platform-client/components/VerticalSpace/VerticalSpace.tsx
6151
6151
  init_react_import();
6152
6152
 
6153
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css#css-module
6153
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css#css-module
6154
6154
  init_react_import();
6155
6155
  var VerticalSpace_module_default = { "VerticalSpace": "_VerticalSpace_1tjaw_1", "VerticalSpace--size4": "_VerticalSpace--size4_1tjaw_5", "VerticalSpace--size8": "_VerticalSpace--size8_1tjaw_9", "VerticalSpace--size16": "_VerticalSpace--size16_1tjaw_13", "VerticalSpace--size32": "_VerticalSpace--size32_1tjaw_17", "VerticalSpace--size40": "_VerticalSpace--size40_1tjaw_21", "VerticalSpace--size48": "_VerticalSpace--size48_1tjaw_25", "VerticalSpace--size56": "_VerticalSpace--size56_1tjaw_29", "VerticalSpace--size96": "_VerticalSpace--size96_1tjaw_33", "VerticalSpace--size128": "_VerticalSpace--size128_1tjaw_37" };
6156
6156
 
@@ -6161,7 +6161,7 @@ var getClassName17 = get_class_name_factory_default2("VerticalSpace", VerticalSp
6161
6161
  // ../platform-client/components/Viewport/index.tsx
6162
6162
  init_react_import();
6163
6163
 
6164
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Viewport/styles.module.css#css-module
6164
+ // css-module:/home/runner/work/platform/platform/packages/platform-client/components/Viewport/styles.module.css#css-module
6165
6165
  init_react_import();
6166
6166
  var styles_module_default7 = { "Viewport": "_Viewport_1vvhm_3", "Viewport--standard": "_Viewport--standard_1vvhm_6", "Viewport--inline": "_Viewport--inline_1vvhm_7", "Viewport--narrow": "_Viewport--narrow_1vvhm_11", "Viewport--flex": "_Viewport--flex_1vvhm_19" };
6167
6167
 
@@ -6175,7 +6175,7 @@ import { createContext as createContext2, useContext as useContext2, useState as
6175
6175
  import { jsx as jsx28 } from "react/jsx-runtime";
6176
6176
  var ctx = createContext2({});
6177
6177
 
6178
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/ChatBody/styles.module.css#css-module
6178
+ // css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/ChatBody/styles.module.css#css-module
6179
6179
  init_react_import();
6180
6180
  var styles_module_default8 = { "Chat": "_Chat_1njo2_1", "Chat-inner": "_Chat-inner_1njo2_17", "Chat--hasMessages": "_Chat--hasMessages_1njo2_25", "Chat--hasChildren": "_Chat--hasChildren_1njo2_29", "Chat-messages": "_Chat-messages_1njo2_34", "Chat-form": "_Chat-form_1njo2_41", "Chat--hideInput": "_Chat--hideInput_1njo2_46", "Chat-formHelper": "_Chat-formHelper_1njo2_60", "Chat-examplePrompts": "_Chat-examplePrompts_1njo2_75", "Chat-examplePrompt": "_Chat-examplePrompt_1njo2_75", "Chat-examplePromptArrow": "_Chat-examplePromptArrow_1njo2_105", "Chat-default": "_Chat-default_1njo2_110", "ChatMessage": "_ChatMessage_1njo2_127", "ChatMessage--userRole": "_ChatMessage--userRole_1njo2_133", "ChatMessage-text": "_ChatMessage-text_1njo2_133", "ChatMessage-data": "_ChatMessage-data_1njo2_231", "ChatMessage-dataInner": "_ChatMessage-dataInner_1njo2_242", "ChatMessage-dataIcon": "_ChatMessage-dataIcon_1njo2_248", "Chat-loader": "_Chat-loader_1njo2_252", "Chat-error": "_Chat-error_1njo2_257", "Chat-errorLabel": "_Chat-errorLabel_1njo2_266", "Chat-errorAction": "_Chat-errorAction_1njo2_270" };
6181
6181
 
@@ -6187,7 +6187,7 @@ import {
6187
6187
  useState as useState13
6188
6188
  } from "react";
6189
6189
 
6190
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/PromptForm/styles.module.css#css-module
6190
+ // css-module:/home/runner/work/platform/platform/packages/plugin-ai/src/components/PromptForm/styles.module.css#css-module
6191
6191
  init_react_import();
6192
6192
  var styles_module_default9 = { "PromptForm": "_PromptForm_1r4kq_1", "PromptForm-inner": "_PromptForm-inner_1r4kq_8", "PromptForm--dark": "_PromptForm--dark_1r4kq_14", "PromptForm--glow": "_PromptForm--glow_1r4kq_19", "PromptForm-glow": "_PromptForm-glow_1r4kq_19", "loop": "_loop_1r4kq_1", "PromptForm-formInner": "_PromptForm-formInner_1r4kq_60", "PromptForm-input": "_PromptForm-input_1r4kq_66", "PromptForm--disabled": "_PromptForm--disabled_1r4kq_97", "PromptForm-helper": "_PromptForm-helper_1r4kq_102", "PromptForm-actions": "_PromptForm-actions_1r4kq_112", "PromptForm-actionsLeft": "_PromptForm-actionsLeft_1r4kq_123", "PromptForm-actionsRight": "_PromptForm-actionsRight_1r4kq_130", "PromptForm-actionSubmit": "_PromptForm-actionSubmit_1r4kq_135", "PromptForm--userCta": "_PromptForm--userCta_1r4kq_149", "PromptForm--isDisabled": "_PromptForm--isDisabled_1r4kq_157", "PromptForm--isLoading": "_PromptForm--isLoading_1r4kq_162" };
6193
6193
 
@@ -6657,29 +6657,39 @@ function Chat2({
6657
6657
  const [toolStatus, setToolStatus] = useState14({});
6658
6658
  const uploadScreenshot = useCallback4(
6659
6659
  async (width, bucketUrl) => {
6660
- const iframeDocument = document?.getElementById("preview-frame")?.contentDocument?.documentElement ?? null;
6661
- if (!iframeDocument) return;
6662
- const canvas = await html2canvas(iframeDocument, {
6663
- scale: 2,
6664
- backgroundColor: "#ffffff",
6665
- width,
6666
- windowWidth: width,
6667
- foreignObjectRendering: false,
6668
- imageTimeout: 3e4,
6669
- logging: false,
6670
- allowTaint: false,
6671
- useCORS: true,
6672
- scrollY: 0,
6673
- ignoreElements: (el) => Array.from(el.classList).some(
6674
- (c2) => c2.startsWith("_DraggableComponent--hover") || c2.startsWith("_ActionBar")
6675
- )
6676
- });
6677
- const image = canvas.toDataURL("image/webp", 0.8);
6678
- const blob = await (await fetch(image)).blob();
6679
- await fetch(bucketUrl, {
6680
- method: "PUT",
6681
- body: blob
6682
- });
6660
+ try {
6661
+ const iframeDocument = document?.getElementById("preview-frame")?.contentDocument?.documentElement ?? null;
6662
+ if (!iframeDocument) {
6663
+ throw new Error("Preview frame not found");
6664
+ }
6665
+ const canvas = await html2canvas(iframeDocument, {
6666
+ scale: 2,
6667
+ backgroundColor: "#ffffff",
6668
+ width,
6669
+ windowWidth: width,
6670
+ foreignObjectRendering: false,
6671
+ imageTimeout: 3e4,
6672
+ logging: false,
6673
+ allowTaint: false,
6674
+ useCORS: true,
6675
+ scrollY: 0,
6676
+ ignoreElements: (el) => Array.from(el.classList).some(
6677
+ (c2) => c2.startsWith("_DraggableComponent--hover") || c2.startsWith("_ActionBar")
6678
+ )
6679
+ });
6680
+ const image = canvas.toDataURL("image/webp", 0.8);
6681
+ const imageResponse = await fetch(image);
6682
+ const blob = await imageResponse.blob();
6683
+ const uploadResponse = await fetch(bucketUrl, {
6684
+ method: "PUT",
6685
+ body: blob
6686
+ });
6687
+ if (!uploadResponse.ok) {
6688
+ throw new Error(`Upload failed with status ${uploadResponse.status}`);
6689
+ }
6690
+ } catch (e2) {
6691
+ console.error("Failed to upload screenshot", e2);
6692
+ }
6683
6693
  },
6684
6694
  []
6685
6695
  );
@@ -6724,7 +6734,7 @@ function Chat2({
6724
6734
  return;
6725
6735
  }
6726
6736
  case "data-send-screenshot": {
6727
- dataPart.data.urls.map((obj) => {
6737
+ dataPart.data.urls.forEach((obj) => {
6728
6738
  const [[key, value]] = Object.entries(obj);
6729
6739
  const breakpoint = Number(key);
6730
6740
  uploadScreenshot(breakpoint, value);
@@ -6736,7 +6746,7 @@ function Chat2({
6736
6746
  return;
6737
6747
  }
6738
6748
  },
6739
- [getPuck]
6749
+ [getPuck, puckDispatch, uploadScreenshot]
6740
6750
  );
6741
6751
  const { messages, status, sendMessage, regenerate, setMessages } = useChat({
6742
6752
  generateId: () => prefixedUlid("msg"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/plugin-ai",
3
- "version": "0.6.1-canary.ee6f7b13",
3
+ "version": "0.6.1-canary.f1d4df0c",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "puckeditor/puck",
6
6
  "bugs": "https://github.com/puckeditor/puck/issues",