@puckeditor/plugin-ai 0.1.0-canary.edb4f9bd → 0.1.0-canary.f39908a2

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
@@ -602,13 +602,13 @@ p {
602
602
  }
603
603
 
604
604
  /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Page/Page.module.css/#css-module-data */
605
- ._Page_1pzwy_1 {
605
+ ._Page_1uz1e_1 {
606
606
  display: flex;
607
607
  flex-direction: column;
608
608
  height: 100%;
609
609
  overflow: hidden;
610
610
  }
611
- ._Page-masthead_1pzwy_8 {
611
+ ._Page-masthead_1uz1e_8 {
612
612
  align-items: center;
613
613
  display: flex;
614
614
  gap: 16px;
@@ -617,75 +617,43 @@ p {
617
617
  border-bottom: 1px solid var(--puck-color-grey-10);
618
618
  min-height: 64px;
619
619
  }
620
- ._Page-crumbs_1pzwy_18 {
620
+ ._Page-crumbs_1uz1e_18 {
621
621
  display: flex;
622
622
  gap: 32px;
623
623
  }
624
- ._Page-crumb_1pzwy_18 {
624
+ ._Page-crumb_1uz1e_18 {
625
625
  color: var(--puck-color-grey-05);
626
626
  position: relative;
627
627
  }
628
- ._Page-crumbLink_1pzwy_28 {
628
+ ._Page-crumbLink_1uz1e_28 {
629
629
  color: var(--puck-color-grey-05);
630
630
  text-decoration: none;
631
631
  }
632
- ._Page-crumbLink_1pzwy_28:hover {
632
+ ._Page-crumbLink_1uz1e_28:hover {
633
633
  color: var(--puck-color-azure-04);
634
634
  }
635
- ._Page-crumb_1pzwy_18:last-of-type {
635
+ ._Page-crumb_1uz1e_18:last-of-type {
636
636
  color: var(--puck-color-grey-01);
637
637
  font-weight: 600;
638
638
  }
639
- ._Page-crumb_1pzwy_18::before {
639
+ ._Page-crumb_1uz1e_18::before {
640
640
  position: absolute;
641
641
  content: "/";
642
642
  left: -19px;
643
643
  color: var(--puck-color-grey-09);
644
644
  font-weight: 400;
645
645
  }
646
- ._Page-crumb_1pzwy_18:first-of-type::before {
646
+ ._Page-crumb_1uz1e_18:first-of-type::before {
647
647
  display: none;
648
648
  }
649
- ._Page-crumb_1pzwy_18 {
649
+ ._Page-crumb_1uz1e_18 {
650
650
  color: var(--puck-color-grey-05);
651
651
  position: relative;
652
652
  text-decoration: none;
653
653
  }
654
- ._Page-actions_1pzwy_60 {
654
+ ._Page-actions_1uz1e_60 {
655
655
  margin-left: auto;
656
656
  }
657
- ._Page-footer_1pzwy_64 {
658
- border-top: 1px solid var(--puck-color-grey-10);
659
- padding: 16px 24px;
660
- }
661
-
662
- /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Pagination/Pagination.module.css/#css-module-data */
663
- ._Pagination_1okv2_1 {
664
- align-items: baseline;
665
- display: flex;
666
- gap: 4px;
667
- }
668
- ._PaginationButton_1okv2_8 {
669
- align-items: center;
670
- border-radius: 4px;
671
- color: var(--puck-color-grey-05);
672
- display: flex;
673
- justify-content: center;
674
- text-decoration: none;
675
- min-width: 40px;
676
- height: 40px;
677
- }
678
- ._PaginationButton--isActive_1okv2_20 {
679
- background-color: var(--puck-color-azure-11);
680
- color: var(--puck-color-azure-04);
681
- }
682
- ._PaginationButton_1okv2_8:hover {
683
- background-color: var(--puck-color-azure-11);
684
- color: var(--puck-color-azure-04);
685
- }
686
- ._Pagination-ellipsis_1okv2_30 {
687
- color: var(--puck-color-grey-05);
688
- }
689
657
 
690
658
  /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Section/Section.module.css/#css-module-data */
691
659
  ._Section-inner_1uwo0_1 {
@@ -769,26 +737,23 @@ p {
769
737
  }
770
738
 
771
739
  /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css/#css-module-data */
772
- ._Table_1w0os_1 {
740
+ ._Table_1t44j_1 {
773
741
  color: black;
774
742
  display: flex;
775
743
  flex-direction: column;
776
744
  flex-grow: 1;
777
- overflow-y: auto;
778
745
  }
779
- ._Table-filters_1w0os_9 {
746
+ ._Table-filters_1t44j_8 {
780
747
  margin: 16px;
781
748
  }
782
- ._Table-inner_1w0os_13 {
749
+ ._Table-inner_1t44j_12 {
783
750
  text-align: left;
784
751
  }
785
- ._Table-table_1w0os_17 {
786
- color: var(--puck-color-grey-02);
787
- font-size: var(--puck-font-size-xxs);
752
+ ._Table-table_1t44j_16 {
788
753
  position: relative;
789
754
  width: 100%;
790
755
  }
791
- ._Table_1w0os_1 thead {
756
+ ._Table_1t44j_1 thead {
792
757
  background: white;
793
758
  font-size: var(--puck-font-size-xxs);
794
759
  position: sticky;
@@ -796,58 +761,55 @@ p {
796
761
  white-space: nowrap;
797
762
  z-index: 1;
798
763
  }
799
- ._Table_1w0os_1 thead::after {
764
+ ._Table_1t44j_1 thead::after {
800
765
  content: "";
801
766
  position: absolute;
802
767
  height: 1px;
803
768
  width: 100%;
804
- background-color: var(--puck-color-grey-10);
769
+ background-color: var(--puck-color-grey-09);
805
770
  }
806
- ._Table_1w0os_1 tbody tr {
771
+ ._Table_1t44j_1 tbody tr {
807
772
  z-index: 0;
808
773
  }
809
- ._Table_1w0os_1 th {
810
- background: var(--puck-color-grey-12);
811
- font-weight: 400;
774
+ ._Table_1t44j_1 th {
775
+ background: white;
776
+ font-weight: 600;
812
777
  padding-left: 24px;
813
778
  padding-right: 24px;
814
- padding-bottom: 12px;
815
- padding-top: 12px;
779
+ padding-bottom: 20px;
780
+ padding-top: 20px;
816
781
  }
817
782
  @media (--standard-viewport) {
818
- ._Table_1w0os_1 th {
783
+ ._Table_1t44j_1 th {
819
784
  padding-left: 32px;
820
785
  padding-right: 32px;
821
786
  }
822
787
  }
823
- ._Table_1w0os_1 td {
788
+ ._Table_1t44j_1 td {
824
789
  border-bottom: 1px solid var(--puck-color-grey-10);
825
790
  padding-left: 24px;
826
791
  padding-right: 24px;
827
- padding-bottom: 16px;
828
- padding-top: 16px;
792
+ padding-bottom: 20px;
793
+ padding-top: 20px;
829
794
  white-space: nowrap;
830
795
  }
831
- ._Table_1w0os_1 td:not(:first-of-type) {
832
- color: var(--puck-color-grey-05);
833
- }
834
- ._Table_1w0os_1 tbody tr:last-of-type td {
796
+ ._Table_1t44j_1 tbody tr:last-of-type td {
835
797
  border-bottom: none;
836
798
  }
837
799
  @media (--standard-viewport) {
838
- ._Table_1w0os_1 td {
800
+ ._Table_1t44j_1 td {
839
801
  padding-left: 32px;
840
802
  padding-right: 32px;
841
803
  }
842
804
  }
843
- ._Table-footer_1w0os_85 {
805
+ ._Table-footer_1t44j_78 {
844
806
  border-top: 1px solid var(--puck-color-grey-09);
845
807
  }
846
- ._Table--clickableRows_1w0os_89 tbody tr:hover {
808
+ ._Table--clickableRows_1t44j_82 tbody tr:hover {
847
809
  background: var(--puck-color-azure-12);
848
810
  cursor: pointer;
849
811
  }
850
- ._Table-placeholder_1w0os_94 {
812
+ ._Table-placeholder_1t44j_87 {
851
813
  align-items: center;
852
814
  color: var(--puck-color-grey-06);
853
815
  justify-content: center;
@@ -857,9 +819,6 @@ p {
857
819
  width: 100%;
858
820
  height: 100%;
859
821
  }
860
- ._Table-loader_1w0os_105 {
861
- padding: 16px 24px;
862
- }
863
822
 
864
823
  /* css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css/#css-module-data */
865
824
  ._VerticalSpace_1tjaw_1 {
package/dist/index.js CHANGED
@@ -20681,7 +20681,7 @@ function useChat(_a17 = {}) {
20681
20681
 
20682
20682
  // src/components/Chat/index.tsx
20683
20683
  var import_puck2 = require("@measured/puck");
20684
- var import_react20 = require("react");
20684
+ var import_react19 = require("react");
20685
20685
  var import_ulid = require("ulid");
20686
20686
 
20687
20687
  // ../utils/lib/get-class-name-factory.ts
@@ -20721,7 +20721,7 @@ var styles_module_default = { "Chat": "_Chat_1mv7h_1", "Chat-header": "_Chat-hea
20721
20721
 
20722
20722
  // src/components/ChatBody/index.tsx
20723
20723
  init_react_import();
20724
- var import_react18 = require("react");
20724
+ var import_react17 = require("react");
20725
20725
  var import_use_stick_to_bottom = require("use-stick-to-bottom");
20726
20726
  var import_react_markdown = __toESM(require("react-markdown"));
20727
20727
 
@@ -21182,28 +21182,12 @@ init_react_import();
21182
21182
 
21183
21183
  // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Page/Page.module.css#css-module
21184
21184
  init_react_import();
21185
- var Page_module_default = { "Page": "_Page_1pzwy_1", "Page-masthead": "_Page-masthead_1pzwy_8", "Page-crumbs": "_Page-crumbs_1pzwy_18", "Page-crumb": "_Page-crumb_1pzwy_18", "Page-crumbLink": "_Page-crumbLink_1pzwy_28", "Page-actions": "_Page-actions_1pzwy_60", "Page-footer": "_Page-footer_1pzwy_64" };
21185
+ var Page_module_default = { "Page": "_Page_1uz1e_1", "Page-masthead": "_Page-masthead_1uz1e_8", "Page-crumbs": "_Page-crumbs_1uz1e_18", "Page-crumb": "_Page-crumb_1uz1e_18", "Page-crumbLink": "_Page-crumbLink_1uz1e_28", "Page-actions": "_Page-actions_1uz1e_60" };
21186
21186
 
21187
21187
  // ../platform-client/components/Page/Page.tsx
21188
21188
  var import_jsx_runtime14 = require("react/jsx-runtime");
21189
21189
  var cx2 = getClassNameFactory2("Page", Page_module_default);
21190
21190
 
21191
- // ../platform-client/components/Pagination/index.ts
21192
- init_react_import();
21193
-
21194
- // ../platform-client/components/Pagination/Pagination.tsx
21195
- init_react_import();
21196
- var import_react13 = require("react");
21197
-
21198
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Pagination/Pagination.module.css#css-module
21199
- init_react_import();
21200
- var Pagination_module_default = { "Pagination": "_Pagination_1okv2_1", "PaginationButton": "_PaginationButton_1okv2_8", "PaginationButton--isActive": "_PaginationButton--isActive_1okv2_20", "Pagination-ellipsis": "_Pagination-ellipsis_1okv2_30" };
21201
-
21202
- // ../platform-client/components/Pagination/Pagination.tsx
21203
- var import_jsx_runtime15 = require("react/jsx-runtime");
21204
- var cx3 = getClassNameFactory2("Pagination", Pagination_module_default);
21205
- var cxButton = getClassNameFactory2("PaginationButton", Pagination_module_default);
21206
-
21207
21191
  // ../platform-client/components/Section/index.ts
21208
21192
  init_react_import();
21209
21193
 
@@ -21215,7 +21199,7 @@ init_react_import();
21215
21199
  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" };
21216
21200
 
21217
21201
  // ../platform-client/components/Section/Section.tsx
21218
- var import_jsx_runtime16 = require("react/jsx-runtime");
21202
+ var import_jsx_runtime15 = require("react/jsx-runtime");
21219
21203
  var getClassName12 = getClassNameFactory2("Section", Section_module_default);
21220
21204
 
21221
21205
  // ../platform-client/components/StatusTag/index.ts
@@ -21235,25 +21219,25 @@ init_react_import();
21235
21219
  var Tag_module_default = { "Tag": "_Tag_1baze_1", "Tag--colorBlue": "_Tag--colorBlue_1baze_19", "Tag--colorGreen": "_Tag--colorGreen_1baze_23", "Tag--colorRed": "_Tag--colorRed_1baze_27", "Tag--colorMuted": "_Tag--colorMuted_1baze_31", "Tag-sprite": "_Tag-sprite_1baze_35", "Tag--pulse": "_Tag--pulse_1baze_39", "pulse": "_pulse_1baze_1" };
21236
21220
 
21237
21221
  // ../platform-client/components/Tag/Tag.tsx
21238
- var import_jsx_runtime17 = require("react/jsx-runtime");
21222
+ var import_jsx_runtime16 = require("react/jsx-runtime");
21239
21223
  var getClassName13 = getClassNameFactory2("Tag", Tag_module_default);
21240
21224
 
21241
21225
  // ../platform-client/components/StatusTag/StatusTag.tsx
21242
- var import_jsx_runtime18 = require("react/jsx-runtime");
21226
+ var import_jsx_runtime17 = require("react/jsx-runtime");
21243
21227
 
21244
21228
  // ../platform-client/components/Table/index.ts
21245
21229
  init_react_import();
21246
21230
 
21247
21231
  // ../platform-client/components/Table/Table.tsx
21248
21232
  init_react_import();
21249
- var import_react14 = require("react");
21233
+ var import_react13 = require("react");
21250
21234
 
21251
21235
  // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css#css-module
21252
21236
  init_react_import();
21253
- var Table_module_default = { "Table": "_Table_1w0os_1", "Table-filters": "_Table-filters_1w0os_9", "Table-inner": "_Table-inner_1w0os_13", "Table-table": "_Table-table_1w0os_17", "Table-footer": "_Table-footer_1w0os_85", "Table--clickableRows": "_Table--clickableRows_1w0os_89", "Table-placeholder": "_Table-placeholder_1w0os_94", "Table-loader": "_Table-loader_1w0os_105" };
21237
+ var Table_module_default = { "Table": "_Table_1t44j_1", "Table-filters": "_Table-filters_1t44j_8", "Table-inner": "_Table-inner_1t44j_12", "Table-table": "_Table-table_1t44j_16", "Table-footer": "_Table-footer_1t44j_78", "Table--clickableRows": "_Table--clickableRows_1t44j_82", "Table-placeholder": "_Table-placeholder_1t44j_87" };
21254
21238
 
21255
21239
  // ../platform-client/components/Table/Table.tsx
21256
- var import_jsx_runtime19 = require("react/jsx-runtime");
21240
+ var import_jsx_runtime18 = require("react/jsx-runtime");
21257
21241
  var getClassName14 = get_class_name_factory_default("Table", Table_module_default);
21258
21242
 
21259
21243
  // ../platform-client/components/Textarea/index.tsx
@@ -21271,14 +21255,14 @@ init_react_import();
21271
21255
  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" };
21272
21256
 
21273
21257
  // ../platform-client/components/VerticalSpace/VerticalSpace.tsx
21274
- var import_jsx_runtime20 = require("react/jsx-runtime");
21258
+ var import_jsx_runtime19 = require("react/jsx-runtime");
21275
21259
  var getClassName15 = get_class_name_factory_default("VerticalSpace", VerticalSpace_module_default);
21276
21260
 
21277
21261
  // ../platform-client/context/editor.tsx
21278
21262
  init_react_import();
21279
- var import_react15 = require("react");
21280
- var import_jsx_runtime21 = require("react/jsx-runtime");
21281
- var ctx = (0, import_react15.createContext)({});
21263
+ var import_react14 = require("react");
21264
+ var import_jsx_runtime20 = require("react/jsx-runtime");
21265
+ var ctx = (0, import_react14.createContext)({});
21282
21266
 
21283
21267
  // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/ChatBody/styles.module.css#css-module
21284
21268
  init_react_import();
@@ -21286,15 +21270,15 @@ var styles_module_default3 = { "Chat": "_Chat_14j71_1", "Chat-inner": "_Chat-inn
21286
21270
 
21287
21271
  // src/components/PromptForm/index.tsx
21288
21272
  init_react_import();
21289
- var import_react16 = require("react");
21273
+ var import_react15 = require("react");
21290
21274
 
21291
21275
  // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/PromptForm/styles.module.css#css-module
21292
21276
  init_react_import();
21293
21277
  var styles_module_default4 = { "PromptForm": "_PromptForm_136g1_1", "PromptForm-inner": "_PromptForm-inner_136g1_8", "PromptForm--dark": "_PromptForm--dark_136g1_14", "PromptForm--glow": "_PromptForm--glow_136g1_19", "PromptForm-glow": "_PromptForm-glow_136g1_19", "loop": "_loop_136g1_1", "PromptForm-formInner": "_PromptForm-formInner_136g1_60", "PromptForm-input": "_PromptForm-input_136g1_64", "PromptForm--disabled": "_PromptForm--disabled_136g1_92", "PromptForm-helper": "_PromptForm-helper_136g1_97", "PromptForm-actions": "_PromptForm-actions_136g1_107", "PromptForm-actionsLeft": "_PromptForm-actionsLeft_136g1_118", "PromptForm-actionsRight": "_PromptForm-actionsRight_136g1_124", "PromptForm-actionSubmit": "_PromptForm-actionSubmit_136g1_128", "PromptForm--isDisabled": "_PromptForm--isDisabled_136g1_147", "PromptForm--isLoading": "_PromptForm--isLoading_136g1_152" };
21294
21278
 
21295
21279
  // src/components/PromptForm/index.tsx
21296
- var import_jsx_runtime22 = require("react/jsx-runtime");
21297
- var cx4 = getClassNameFactory2("PromptForm", styles_module_default4);
21280
+ var import_jsx_runtime21 = require("react/jsx-runtime");
21281
+ var cx3 = getClassNameFactory2("PromptForm", styles_module_default4);
21298
21282
  function PromptForm({
21299
21283
  actions,
21300
21284
  colorScheme = "light",
@@ -21306,8 +21290,8 @@ function PromptForm({
21306
21290
  isLoading,
21307
21291
  placeholder = "Create a page for..."
21308
21292
  }) {
21309
- const hasSetInitialPrompt = (0, import_react16.useRef)(false);
21310
- const [prompt, setPrompt] = (0, import_react16.useState)("");
21293
+ const hasSetInitialPrompt = (0, import_react15.useRef)(false);
21294
+ const [prompt, setPrompt] = (0, import_react15.useState)("");
21311
21295
  const sendPrompt = () => {
21312
21296
  if (isLoading || isDisabled) return;
21313
21297
  if (handleSubmit) {
@@ -21315,7 +21299,7 @@ function PromptForm({
21315
21299
  }
21316
21300
  setPrompt("");
21317
21301
  };
21318
- (0, import_react16.useEffect)(() => {
21302
+ (0, import_react15.useEffect)(() => {
21319
21303
  const currentUrl = new URL(location.href);
21320
21304
  const initialPrompt = currentUrl.searchParams.get("initialPrompt");
21321
21305
  if (!hasSetInitialPrompt.current && initialPrompt && prompt === "") {
@@ -21323,31 +21307,31 @@ function PromptForm({
21323
21307
  setPrompt(initialPrompt);
21324
21308
  }
21325
21309
  }, [setPrompt]);
21326
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
21310
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
21327
21311
  "div",
21328
21312
  {
21329
- className: cx4({
21313
+ className: cx3({
21330
21314
  isDisabled,
21331
21315
  isLoading,
21332
21316
  dark: colorScheme === "dark",
21333
21317
  glow
21334
21318
  }),
21335
21319
  children: [
21336
- helperText ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cx4("helper"), children: helperText }) : null,
21337
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cx4("inner"), children: [
21338
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: cx4("glow") }),
21339
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
21320
+ helperText ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cx3("helper"), children: helperText }) : null,
21321
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cx3("inner"), children: [
21322
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: cx3("glow") }),
21323
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
21340
21324
  "form",
21341
21325
  {
21342
21326
  onSubmit: (e) => {
21343
21327
  e.preventDefault();
21344
21328
  sendPrompt();
21345
21329
  },
21346
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cx4("formInner"), children: [
21347
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
21330
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cx3("formInner"), children: [
21331
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
21348
21332
  import_react_textarea_autosize.default,
21349
21333
  {
21350
- className: cx4("input"),
21334
+ className: cx3("input"),
21351
21335
  name: "prompt",
21352
21336
  minRows: 2,
21353
21337
  placeholder,
@@ -21368,15 +21352,15 @@ function PromptForm({
21368
21352
  }
21369
21353
  }
21370
21354
  ),
21371
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cx4("actions"), children: [
21372
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cx4("actionsLeft"), children: actions }),
21373
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cx4("actionsRight"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
21355
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cx3("actions"), children: [
21356
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cx3("actionsLeft"), children: actions }),
21357
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cx3("actionsRight"), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
21374
21358
  "button",
21375
21359
  {
21376
- className: cx4("actionSubmit"),
21360
+ className: cx3("actionSubmit"),
21377
21361
  type: "submit",
21378
21362
  disabled: isLoading,
21379
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ArrowUp, {})
21363
+ children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ArrowUp, {})
21380
21364
  }
21381
21365
  ) })
21382
21366
  ] })
@@ -21391,13 +21375,13 @@ function PromptForm({
21391
21375
 
21392
21376
  // src/lib/context.ts
21393
21377
  init_react_import();
21394
- var import_react17 = require("react");
21395
- var toolStatusContext = (0, import_react17.createContext)({});
21378
+ var import_react16 = require("react");
21379
+ var toolStatusContext = (0, import_react16.createContext)({});
21396
21380
  var ToolStatusProvider = toolStatusContext.Provider;
21397
21381
 
21398
21382
  // src/components/ChatBody/index.tsx
21399
- var import_jsx_runtime23 = require("react/jsx-runtime");
21400
- var cx5 = getClassNameFactory2("Chat", styles_module_default3);
21383
+ var import_jsx_runtime22 = require("react/jsx-runtime");
21384
+ var cx4 = getClassNameFactory2("Chat", styles_module_default3);
21401
21385
  var cxMessage = getClassNameFactory2("ChatMessage", styles_module_default3);
21402
21386
  function ChatBody({
21403
21387
  children,
@@ -21412,17 +21396,17 @@ function ChatBody({
21412
21396
  }) {
21413
21397
  const { scrollRef, contentRef } = (0, import_use_stick_to_bottom.useStickToBottom)();
21414
21398
  const hasMessages = messages && messages.length > 0;
21415
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cx5({ hasMessages, hasChildren: !!children, hideInput }), children: [
21416
- children ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cx5("default"), children }) : null,
21417
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cx5("inner"), ref: scrollRef, children: [
21418
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cx5("messages"), ref: contentRef, children: messages.toReversed().map((message) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChatMessage, { message }, message.id)) }),
21419
- status === "submitted" && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cx5("loader"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Loader, { size: 14 }) }),
21420
- error45 && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cx5("error"), children: [
21421
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cx5("errorLabel"), children: "Something went wrong." }),
21422
- handleRetry && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cx5("errorAction"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(IconButton, { title: "Retry", onClick: handleRetry, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(RotateCcw, { size: "14" }) }) })
21399
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cx4({ hasMessages, hasChildren: !!children, hideInput }), children: [
21400
+ children ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cx4("default"), children }) : null,
21401
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cx4("inner"), ref: scrollRef, children: [
21402
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cx4("messages"), ref: contentRef, children: messages.toReversed().map((message) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChatMessage, { message }, message.id)) }),
21403
+ status === "submitted" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cx4("loader"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Loader, { size: 14 }) }),
21404
+ error45 && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cx4("error"), children: [
21405
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cx4("errorLabel"), children: "Something went wrong." }),
21406
+ handleRetry && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cx4("errorAction"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconButton, { title: "Retry", onClick: handleRetry, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RotateCcw, { size: "14" }) }) })
21423
21407
  ] }),
21424
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cx5("form"), children: [
21425
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
21408
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cx4("form"), children: [
21409
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
21426
21410
  PromptForm,
21427
21411
  {
21428
21412
  glow: !hasMessages,
@@ -21432,19 +21416,19 @@ function ChatBody({
21432
21416
  placeholder: "What do you want to build?"
21433
21417
  }
21434
21418
  ),
21435
- examplePrompts ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cx5("examplePrompts"), children: examplePrompts }) : null
21419
+ examplePrompts ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cx4("examplePrompts"), children: examplePrompts }) : null
21436
21420
  ] })
21437
21421
  ] })
21438
21422
  ] });
21439
21423
  }
21440
21424
  function ChatMessage({ message }) {
21441
21425
  const { role, parts } = message;
21442
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
21426
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
21443
21427
  "div",
21444
21428
  {
21445
21429
  className: cxMessage({ [`${role}Role`]: true }),
21446
21430
  "data-message-id": message.id,
21447
- children: parts.map((part, i) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
21431
+ children: parts.map((part, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
21448
21432
  ChatMessagePart,
21449
21433
  {
21450
21434
  part,
@@ -21460,25 +21444,25 @@ function ChatMessageWrapper({
21460
21444
  role
21461
21445
  }) {
21462
21446
  if (role === "assistant") {
21463
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_markdown.default, { children });
21447
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_markdown.default, { children });
21464
21448
  }
21465
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { children });
21449
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children });
21466
21450
  }
21467
21451
  function ChatMessagePart({
21468
21452
  part,
21469
21453
  role
21470
21454
  }) {
21471
21455
  if (part.type === "text") {
21472
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cxMessage("text"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ChatMessageWrapper, { role, children: part.text }) });
21456
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cxMessage("text"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ChatMessageWrapper, { role, children: part.text }) });
21473
21457
  }
21474
21458
  if (part.type === "tool-createPage") {
21475
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PuckTool, __spreadValues({}, part));
21459
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PuckTool, __spreadValues({}, part));
21476
21460
  }
21477
21461
  if (part.type === "tool-updatePage") {
21478
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PuckTool, __spreadValues({}, part));
21462
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PuckTool, __spreadValues({}, part));
21479
21463
  }
21480
21464
  if (part.type === "tool-userTool") {
21481
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PuckTool, __spreadValues({}, part));
21465
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(PuckTool, __spreadValues({}, part));
21482
21466
  }
21483
21467
  return null;
21484
21468
  }
@@ -21487,30 +21471,30 @@ function PuckTool({
21487
21471
  output,
21488
21472
  defaultLabel = "Thinking..."
21489
21473
  }) {
21490
- const toolStatus = (0, import_react18.useContext)(toolStatusContext)[toolCallId];
21474
+ const toolStatus = (0, import_react17.useContext)(toolStatusContext)[toolCallId];
21491
21475
  const outputObj = output;
21492
21476
  const status = outputObj && "status" in outputObj ? outputObj.status : toolStatus != null ? toolStatus : { loading: true, label: defaultLabel };
21493
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolStatus, { status });
21477
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ToolStatus, { status });
21494
21478
  }
21495
21479
  function ToolStatus({ status }) {
21496
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cxMessage("data"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cxMessage("dataInner"), children: [
21497
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cxMessage("dataIcon"), children: status.error ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TriangleAlert, { size: 18 }) : status.loading ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Loader, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Check, { size: 18 }) }),
21498
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: status.label })
21480
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cxMessage("data"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cxMessage("dataInner"), children: [
21481
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cxMessage("dataIcon"), children: status.error ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TriangleAlert, { size: 18 }) : status.loading ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Loader, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Check, { size: 18 }) }),
21482
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: status.label })
21499
21483
  ] }) });
21500
21484
  }
21501
21485
  function ExamplePrompt({
21502
21486
  label,
21503
21487
  href
21504
21488
  }) {
21505
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("a", { className: cx5("examplePrompt"), href, children: [
21506
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: label }),
21507
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cx5("examplePromptArrow"), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ArrowRight, { size: "16" }) })
21489
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("a", { className: cx4("examplePrompt"), href, children: [
21490
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: label }),
21491
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cx4("examplePromptArrow"), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ArrowRight, { size: "16" }) })
21508
21492
  ] });
21509
21493
  }
21510
21494
 
21511
21495
  // src/components/Chat/index.tsx
21512
21496
  var import_qler = __toESM(require("qler"));
21513
- var import_jsx_runtime24 = require("react/jsx-runtime");
21497
+ var import_jsx_runtime23 = require("react/jsx-runtime");
21514
21498
  var q = (0, import_qler.default)();
21515
21499
  var BENCHMARK = false;
21516
21500
  var prefixedUlid = (prefix = "") => `${prefix ? `${prefix}_` : ""}${(0, import_ulid.ulid)()}`;
@@ -21524,11 +21508,11 @@ function Chat2({
21524
21508
  }) {
21525
21509
  const puckDispatch = usePuck((s) => s.dispatch);
21526
21510
  const getPuck = (0, import_puck2.useGetPuck)();
21527
- const localChatId = (0, import_react20.useRef)(chatId);
21528
- const inputRef = (0, import_react20.useRef)(null);
21529
- const pluginRef = (0, import_react20.useRef)(null);
21530
- const [error45, setError] = (0, import_react20.useState)();
21531
- const [toolStatus, setToolStatus] = (0, import_react20.useState)({});
21511
+ const localChatId = (0, import_react19.useRef)(chatId);
21512
+ const inputRef = (0, import_react19.useRef)(null);
21513
+ const pluginRef = (0, import_react19.useRef)(null);
21514
+ const [error45, setError] = (0, import_react19.useState)();
21515
+ const [toolStatus, setToolStatus] = (0, import_react19.useState)({});
21532
21516
  const { messages, status, sendMessage, regenerate } = useChat({
21533
21517
  generateId: () => prefixedUlid("msg"),
21534
21518
  messages: initialMessages,
@@ -21738,7 +21722,7 @@ function Chat2({
21738
21722
  console.error(e);
21739
21723
  });
21740
21724
  };
21741
- const messagesWithStatuses = (0, import_react20.useMemo)(() => {
21725
+ const messagesWithStatuses = (0, import_react19.useMemo)(() => {
21742
21726
  return messages.map((msg) => {
21743
21727
  return __spreadProps(__spreadValues({}, msg), {
21744
21728
  parts: msg.parts.map((part) => {
@@ -21750,22 +21734,22 @@ function Chat2({
21750
21734
  });
21751
21735
  });
21752
21736
  }, [messages, toolStatus]);
21753
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: getClassName16(), ref: pluginRef, children: [
21754
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: getClassName16("header"), children: "AI page builder" }),
21755
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolStatusProvider, { value: toolStatus, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
21737
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getClassName16(), ref: pluginRef, children: [
21738
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: getClassName16("header"), children: "AI page builder" }),
21739
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ToolStatusProvider, { value: toolStatus, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
21756
21740
  ChatBody,
21757
21741
  {
21758
21742
  messages: messagesWithStatuses,
21759
21743
  handleSubmit,
21760
21744
  inputRef,
21761
21745
  status,
21762
- examplePrompts: examplePrompts == null ? void 0 : examplePrompts.map(({ label, href }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ExamplePrompt, { label, href }, label)),
21746
+ examplePrompts: examplePrompts == null ? void 0 : examplePrompts.map(({ label, href }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ExamplePrompt, { label, href }, label)),
21763
21747
  error: error45,
21764
21748
  handleRetry: () => {
21765
21749
  setError("");
21766
21750
  regenerate();
21767
21751
  },
21768
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
21752
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
21769
21753
  Placeholder,
21770
21754
  {
21771
21755
  dispatch: puckDispatch,
@@ -21796,11 +21780,11 @@ function Placeholder({
21796
21780
  }
21797
21781
  }, 10);
21798
21782
  };
21799
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: getClassName16("placeholder"), children: [
21800
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Bot, { size: "24" }),
21801
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { children: "Use AI to build a page using your own components" }),
21802
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: getClassName16("actions"), children: [
21803
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
21783
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getClassName16("placeholder"), children: [
21784
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Bot, { size: "24" }),
21785
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { children: "Use AI to build a page using your own components" }),
21786
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: getClassName16("actions"), children: [
21787
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
21804
21788
  "button",
21805
21789
  {
21806
21790
  className: getClassName16("action"),
@@ -21808,7 +21792,7 @@ function Placeholder({
21808
21792
  children: "Enter prompt"
21809
21793
  }
21810
21794
  ),
21811
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
21795
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
21812
21796
  "button",
21813
21797
  {
21814
21798
  className: getClassName16("actionOutlined"),
@@ -21832,13 +21816,13 @@ function isScrolledIntoView(el) {
21832
21816
  }
21833
21817
 
21834
21818
  // src/index.tsx
21835
- var import_jsx_runtime25 = require("react/jsx-runtime");
21819
+ var import_jsx_runtime24 = require("react/jsx-runtime");
21836
21820
  function createAIPlugin(opts) {
21837
21821
  return {
21838
21822
  label: "AI",
21839
21823
  name: "ai",
21840
- render: () => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Chat2, __spreadValues({}, opts)),
21841
- icon: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Bot, {}),
21824
+ render: () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Chat2, __spreadValues({}, opts)),
21825
+ icon: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Bot, {}),
21842
21826
  mobilePanelHeight: "min-content"
21843
21827
  };
21844
21828
  }
package/dist/index.mjs CHANGED
@@ -20672,7 +20672,7 @@ function useChat(_a17 = {}) {
20672
20672
 
20673
20673
  // src/components/Chat/index.tsx
20674
20674
  import { createUsePuck, useGetPuck } from "@measured/puck";
20675
- import { useMemo as useMemo3, useRef as useRef7, useState as useState10 } from "react";
20675
+ import { useMemo, useRef as useRef6, useState as useState10 } from "react";
20676
20676
  import { ulid as ulid3 } from "ulid";
20677
20677
 
20678
20678
  // ../utils/lib/get-class-name-factory.ts
@@ -21173,28 +21173,12 @@ init_react_import();
21173
21173
 
21174
21174
  // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Page/Page.module.css#css-module
21175
21175
  init_react_import();
21176
- var Page_module_default = { "Page": "_Page_1pzwy_1", "Page-masthead": "_Page-masthead_1pzwy_8", "Page-crumbs": "_Page-crumbs_1pzwy_18", "Page-crumb": "_Page-crumb_1pzwy_18", "Page-crumbLink": "_Page-crumbLink_1pzwy_28", "Page-actions": "_Page-actions_1pzwy_60", "Page-footer": "_Page-footer_1pzwy_64" };
21176
+ var Page_module_default = { "Page": "_Page_1uz1e_1", "Page-masthead": "_Page-masthead_1uz1e_8", "Page-crumbs": "_Page-crumbs_1uz1e_18", "Page-crumb": "_Page-crumb_1uz1e_18", "Page-crumbLink": "_Page-crumbLink_1uz1e_28", "Page-actions": "_Page-actions_1uz1e_60" };
21177
21177
 
21178
21178
  // ../platform-client/components/Page/Page.tsx
21179
21179
  import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
21180
21180
  var cx2 = getClassNameFactory2("Page", Page_module_default);
21181
21181
 
21182
- // ../platform-client/components/Pagination/index.ts
21183
- init_react_import();
21184
-
21185
- // ../platform-client/components/Pagination/Pagination.tsx
21186
- init_react_import();
21187
- import { useMemo } from "react";
21188
-
21189
- // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Pagination/Pagination.module.css#css-module
21190
- init_react_import();
21191
- var Pagination_module_default = { "Pagination": "_Pagination_1okv2_1", "PaginationButton": "_PaginationButton_1okv2_8", "PaginationButton--isActive": "_PaginationButton--isActive_1okv2_20", "Pagination-ellipsis": "_Pagination-ellipsis_1okv2_30" };
21192
-
21193
- // ../platform-client/components/Pagination/Pagination.tsx
21194
- import { jsx as jsx15 } from "react/jsx-runtime";
21195
- var cx3 = getClassNameFactory2("Pagination", Pagination_module_default);
21196
- var cxButton = getClassNameFactory2("PaginationButton", Pagination_module_default);
21197
-
21198
21182
  // ../platform-client/components/Section/index.ts
21199
21183
  init_react_import();
21200
21184
 
@@ -21206,7 +21190,7 @@ init_react_import();
21206
21190
  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" };
21207
21191
 
21208
21192
  // ../platform-client/components/Section/Section.tsx
21209
- import { jsx as jsx16 } from "react/jsx-runtime";
21193
+ import { jsx as jsx15 } from "react/jsx-runtime";
21210
21194
  var getClassName12 = getClassNameFactory2("Section", Section_module_default);
21211
21195
 
21212
21196
  // ../platform-client/components/StatusTag/index.ts
@@ -21226,25 +21210,25 @@ init_react_import();
21226
21210
  var Tag_module_default = { "Tag": "_Tag_1baze_1", "Tag--colorBlue": "_Tag--colorBlue_1baze_19", "Tag--colorGreen": "_Tag--colorGreen_1baze_23", "Tag--colorRed": "_Tag--colorRed_1baze_27", "Tag--colorMuted": "_Tag--colorMuted_1baze_31", "Tag-sprite": "_Tag-sprite_1baze_35", "Tag--pulse": "_Tag--pulse_1baze_39", "pulse": "_pulse_1baze_1" };
21227
21211
 
21228
21212
  // ../platform-client/components/Tag/Tag.tsx
21229
- import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
21213
+ import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
21230
21214
  var getClassName13 = getClassNameFactory2("Tag", Tag_module_default);
21231
21215
 
21232
21216
  // ../platform-client/components/StatusTag/StatusTag.tsx
21233
- import { jsx as jsx18 } from "react/jsx-runtime";
21217
+ import { jsx as jsx17 } from "react/jsx-runtime";
21234
21218
 
21235
21219
  // ../platform-client/components/Table/index.ts
21236
21220
  init_react_import();
21237
21221
 
21238
21222
  // ../platform-client/components/Table/Table.tsx
21239
21223
  init_react_import();
21240
- import { useEffect as useEffect6, useMemo as useMemo2, useRef as useRef5, useState as useState7 } from "react";
21224
+ import { useState as useState7 } from "react";
21241
21225
 
21242
21226
  // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css#css-module
21243
21227
  init_react_import();
21244
- var Table_module_default = { "Table": "_Table_1w0os_1", "Table-filters": "_Table-filters_1w0os_9", "Table-inner": "_Table-inner_1w0os_13", "Table-table": "_Table-table_1w0os_17", "Table-footer": "_Table-footer_1w0os_85", "Table--clickableRows": "_Table--clickableRows_1w0os_89", "Table-placeholder": "_Table-placeholder_1w0os_94", "Table-loader": "_Table-loader_1w0os_105" };
21228
+ var Table_module_default = { "Table": "_Table_1t44j_1", "Table-filters": "_Table-filters_1t44j_8", "Table-inner": "_Table-inner_1t44j_12", "Table-table": "_Table-table_1t44j_16", "Table-footer": "_Table-footer_1t44j_78", "Table--clickableRows": "_Table--clickableRows_1t44j_82", "Table-placeholder": "_Table-placeholder_1t44j_87" };
21245
21229
 
21246
21230
  // ../platform-client/components/Table/Table.tsx
21247
- import { jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
21231
+ import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
21248
21232
  var getClassName14 = get_class_name_factory_default("Table", Table_module_default);
21249
21233
 
21250
21234
  // ../platform-client/components/Textarea/index.tsx
@@ -21262,13 +21246,13 @@ init_react_import();
21262
21246
  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" };
21263
21247
 
21264
21248
  // ../platform-client/components/VerticalSpace/VerticalSpace.tsx
21265
- import { jsx as jsx20 } from "react/jsx-runtime";
21249
+ import { jsx as jsx19 } from "react/jsx-runtime";
21266
21250
  var getClassName15 = get_class_name_factory_default("VerticalSpace", VerticalSpace_module_default);
21267
21251
 
21268
21252
  // ../platform-client/context/editor.tsx
21269
21253
  init_react_import();
21270
21254
  import { createContext as createContext2, useContext as useContext2, useState as useState8 } from "react";
21271
- import { jsx as jsx21 } from "react/jsx-runtime";
21255
+ import { jsx as jsx20 } from "react/jsx-runtime";
21272
21256
  var ctx = createContext2({});
21273
21257
 
21274
21258
  // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-ai/src/components/ChatBody/styles.module.css#css-module
@@ -21278,8 +21262,8 @@ var styles_module_default3 = { "Chat": "_Chat_14j71_1", "Chat-inner": "_Chat-inn
21278
21262
  // src/components/PromptForm/index.tsx
21279
21263
  init_react_import();
21280
21264
  import {
21281
- useEffect as useEffect7,
21282
- useRef as useRef6,
21265
+ useEffect as useEffect6,
21266
+ useRef as useRef5,
21283
21267
  useState as useState9
21284
21268
  } from "react";
21285
21269
 
@@ -21288,8 +21272,8 @@ init_react_import();
21288
21272
  var styles_module_default4 = { "PromptForm": "_PromptForm_136g1_1", "PromptForm-inner": "_PromptForm-inner_136g1_8", "PromptForm--dark": "_PromptForm--dark_136g1_14", "PromptForm--glow": "_PromptForm--glow_136g1_19", "PromptForm-glow": "_PromptForm-glow_136g1_19", "loop": "_loop_136g1_1", "PromptForm-formInner": "_PromptForm-formInner_136g1_60", "PromptForm-input": "_PromptForm-input_136g1_64", "PromptForm--disabled": "_PromptForm--disabled_136g1_92", "PromptForm-helper": "_PromptForm-helper_136g1_97", "PromptForm-actions": "_PromptForm-actions_136g1_107", "PromptForm-actionsLeft": "_PromptForm-actionsLeft_136g1_118", "PromptForm-actionsRight": "_PromptForm-actionsRight_136g1_124", "PromptForm-actionSubmit": "_PromptForm-actionSubmit_136g1_128", "PromptForm--isDisabled": "_PromptForm--isDisabled_136g1_147", "PromptForm--isLoading": "_PromptForm--isLoading_136g1_152" };
21289
21273
 
21290
21274
  // src/components/PromptForm/index.tsx
21291
- import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
21292
- var cx4 = getClassNameFactory2("PromptForm", styles_module_default4);
21275
+ import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
21276
+ var cx3 = getClassNameFactory2("PromptForm", styles_module_default4);
21293
21277
  function PromptForm({
21294
21278
  actions,
21295
21279
  colorScheme = "light",
@@ -21301,7 +21285,7 @@ function PromptForm({
21301
21285
  isLoading,
21302
21286
  placeholder = "Create a page for..."
21303
21287
  }) {
21304
- const hasSetInitialPrompt = useRef6(false);
21288
+ const hasSetInitialPrompt = useRef5(false);
21305
21289
  const [prompt, setPrompt] = useState9("");
21306
21290
  const sendPrompt = () => {
21307
21291
  if (isLoading || isDisabled) return;
@@ -21310,7 +21294,7 @@ function PromptForm({
21310
21294
  }
21311
21295
  setPrompt("");
21312
21296
  };
21313
- useEffect7(() => {
21297
+ useEffect6(() => {
21314
21298
  const currentUrl = new URL(location.href);
21315
21299
  const initialPrompt = currentUrl.searchParams.get("initialPrompt");
21316
21300
  if (!hasSetInitialPrompt.current && initialPrompt && prompt === "") {
@@ -21321,28 +21305,28 @@ function PromptForm({
21321
21305
  return /* @__PURE__ */ jsxs11(
21322
21306
  "div",
21323
21307
  {
21324
- className: cx4({
21308
+ className: cx3({
21325
21309
  isDisabled,
21326
21310
  isLoading,
21327
21311
  dark: colorScheme === "dark",
21328
21312
  glow
21329
21313
  }),
21330
21314
  children: [
21331
- helperText ? /* @__PURE__ */ jsx22("div", { className: cx4("helper"), children: helperText }) : null,
21332
- /* @__PURE__ */ jsxs11("div", { className: cx4("inner"), children: [
21333
- /* @__PURE__ */ jsx22("span", { className: cx4("glow") }),
21334
- /* @__PURE__ */ jsx22(
21315
+ helperText ? /* @__PURE__ */ jsx21("div", { className: cx3("helper"), children: helperText }) : null,
21316
+ /* @__PURE__ */ jsxs11("div", { className: cx3("inner"), children: [
21317
+ /* @__PURE__ */ jsx21("span", { className: cx3("glow") }),
21318
+ /* @__PURE__ */ jsx21(
21335
21319
  "form",
21336
21320
  {
21337
21321
  onSubmit: (e) => {
21338
21322
  e.preventDefault();
21339
21323
  sendPrompt();
21340
21324
  },
21341
- children: /* @__PURE__ */ jsxs11("div", { className: cx4("formInner"), children: [
21342
- /* @__PURE__ */ jsx22(
21325
+ children: /* @__PURE__ */ jsxs11("div", { className: cx3("formInner"), children: [
21326
+ /* @__PURE__ */ jsx21(
21343
21327
  default2,
21344
21328
  {
21345
- className: cx4("input"),
21329
+ className: cx3("input"),
21346
21330
  name: "prompt",
21347
21331
  minRows: 2,
21348
21332
  placeholder,
@@ -21363,15 +21347,15 @@ function PromptForm({
21363
21347
  }
21364
21348
  }
21365
21349
  ),
21366
- /* @__PURE__ */ jsxs11("div", { className: cx4("actions"), children: [
21367
- /* @__PURE__ */ jsx22("div", { className: cx4("actionsLeft"), children: actions }),
21368
- /* @__PURE__ */ jsx22("div", { className: cx4("actionsRight"), children: /* @__PURE__ */ jsx22(
21350
+ /* @__PURE__ */ jsxs11("div", { className: cx3("actions"), children: [
21351
+ /* @__PURE__ */ jsx21("div", { className: cx3("actionsLeft"), children: actions }),
21352
+ /* @__PURE__ */ jsx21("div", { className: cx3("actionsRight"), children: /* @__PURE__ */ jsx21(
21369
21353
  "button",
21370
21354
  {
21371
- className: cx4("actionSubmit"),
21355
+ className: cx3("actionSubmit"),
21372
21356
  type: "submit",
21373
21357
  disabled: isLoading,
21374
- children: /* @__PURE__ */ jsx22(ArrowUp, {})
21358
+ children: /* @__PURE__ */ jsx21(ArrowUp, {})
21375
21359
  }
21376
21360
  ) })
21377
21361
  ] })
@@ -21391,8 +21375,8 @@ var toolStatusContext = createContext3({});
21391
21375
  var ToolStatusProvider = toolStatusContext.Provider;
21392
21376
 
21393
21377
  // src/components/ChatBody/index.tsx
21394
- import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
21395
- var cx5 = getClassNameFactory2("Chat", styles_module_default3);
21378
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
21379
+ var cx4 = getClassNameFactory2("Chat", styles_module_default3);
21396
21380
  var cxMessage = getClassNameFactory2("ChatMessage", styles_module_default3);
21397
21381
  function ChatBody({
21398
21382
  children,
@@ -21407,17 +21391,17 @@ function ChatBody({
21407
21391
  }) {
21408
21392
  const { scrollRef, contentRef } = useStickToBottom();
21409
21393
  const hasMessages = messages && messages.length > 0;
21410
- return /* @__PURE__ */ jsxs12("div", { className: cx5({ hasMessages, hasChildren: !!children, hideInput }), children: [
21411
- children ? /* @__PURE__ */ jsx23("div", { className: cx5("default"), children }) : null,
21412
- /* @__PURE__ */ jsxs12("div", { className: cx5("inner"), ref: scrollRef, children: [
21413
- /* @__PURE__ */ jsx23("div", { className: cx5("messages"), ref: contentRef, children: messages.toReversed().map((message) => /* @__PURE__ */ jsx23(ChatMessage, { message }, message.id)) }),
21414
- status === "submitted" && /* @__PURE__ */ jsx23("div", { className: cx5("loader"), children: /* @__PURE__ */ jsx23(Loader, { size: 14 }) }),
21415
- error45 && /* @__PURE__ */ jsxs12("div", { className: cx5("error"), children: [
21416
- /* @__PURE__ */ jsx23("div", { className: cx5("errorLabel"), children: "Something went wrong." }),
21417
- handleRetry && /* @__PURE__ */ jsx23("div", { className: cx5("errorAction"), children: /* @__PURE__ */ jsx23(IconButton, { title: "Retry", onClick: handleRetry, children: /* @__PURE__ */ jsx23(RotateCcw, { size: "14" }) }) })
21394
+ return /* @__PURE__ */ jsxs12("div", { className: cx4({ hasMessages, hasChildren: !!children, hideInput }), children: [
21395
+ children ? /* @__PURE__ */ jsx22("div", { className: cx4("default"), children }) : null,
21396
+ /* @__PURE__ */ jsxs12("div", { className: cx4("inner"), ref: scrollRef, children: [
21397
+ /* @__PURE__ */ jsx22("div", { className: cx4("messages"), ref: contentRef, children: messages.toReversed().map((message) => /* @__PURE__ */ jsx22(ChatMessage, { message }, message.id)) }),
21398
+ status === "submitted" && /* @__PURE__ */ jsx22("div", { className: cx4("loader"), children: /* @__PURE__ */ jsx22(Loader, { size: 14 }) }),
21399
+ error45 && /* @__PURE__ */ jsxs12("div", { className: cx4("error"), children: [
21400
+ /* @__PURE__ */ jsx22("div", { className: cx4("errorLabel"), children: "Something went wrong." }),
21401
+ handleRetry && /* @__PURE__ */ jsx22("div", { className: cx4("errorAction"), children: /* @__PURE__ */ jsx22(IconButton, { title: "Retry", onClick: handleRetry, children: /* @__PURE__ */ jsx22(RotateCcw, { size: "14" }) }) })
21418
21402
  ] }),
21419
- /* @__PURE__ */ jsxs12("div", { className: cx5("form"), children: [
21420
- /* @__PURE__ */ jsx23(
21403
+ /* @__PURE__ */ jsxs12("div", { className: cx4("form"), children: [
21404
+ /* @__PURE__ */ jsx22(
21421
21405
  PromptForm,
21422
21406
  {
21423
21407
  glow: !hasMessages,
@@ -21427,19 +21411,19 @@ function ChatBody({
21427
21411
  placeholder: "What do you want to build?"
21428
21412
  }
21429
21413
  ),
21430
- examplePrompts ? /* @__PURE__ */ jsx23("div", { className: cx5("examplePrompts"), children: examplePrompts }) : null
21414
+ examplePrompts ? /* @__PURE__ */ jsx22("div", { className: cx4("examplePrompts"), children: examplePrompts }) : null
21431
21415
  ] })
21432
21416
  ] })
21433
21417
  ] });
21434
21418
  }
21435
21419
  function ChatMessage({ message }) {
21436
21420
  const { role, parts } = message;
21437
- return /* @__PURE__ */ jsx23(
21421
+ return /* @__PURE__ */ jsx22(
21438
21422
  "div",
21439
21423
  {
21440
21424
  className: cxMessage({ [`${role}Role`]: true }),
21441
21425
  "data-message-id": message.id,
21442
- children: parts.map((part, i) => /* @__PURE__ */ jsx23(
21426
+ children: parts.map((part, i) => /* @__PURE__ */ jsx22(
21443
21427
  ChatMessagePart,
21444
21428
  {
21445
21429
  part,
@@ -21455,25 +21439,25 @@ function ChatMessageWrapper({
21455
21439
  role
21456
21440
  }) {
21457
21441
  if (role === "assistant") {
21458
- return /* @__PURE__ */ jsx23(Markdown, { children });
21442
+ return /* @__PURE__ */ jsx22(Markdown, { children });
21459
21443
  }
21460
- return /* @__PURE__ */ jsx23("span", { children });
21444
+ return /* @__PURE__ */ jsx22("span", { children });
21461
21445
  }
21462
21446
  function ChatMessagePart({
21463
21447
  part,
21464
21448
  role
21465
21449
  }) {
21466
21450
  if (part.type === "text") {
21467
- return /* @__PURE__ */ jsx23("div", { className: cxMessage("text"), children: /* @__PURE__ */ jsx23(ChatMessageWrapper, { role, children: part.text }) });
21451
+ return /* @__PURE__ */ jsx22("div", { className: cxMessage("text"), children: /* @__PURE__ */ jsx22(ChatMessageWrapper, { role, children: part.text }) });
21468
21452
  }
21469
21453
  if (part.type === "tool-createPage") {
21470
- return /* @__PURE__ */ jsx23(PuckTool, __spreadValues({}, part));
21454
+ return /* @__PURE__ */ jsx22(PuckTool, __spreadValues({}, part));
21471
21455
  }
21472
21456
  if (part.type === "tool-updatePage") {
21473
- return /* @__PURE__ */ jsx23(PuckTool, __spreadValues({}, part));
21457
+ return /* @__PURE__ */ jsx22(PuckTool, __spreadValues({}, part));
21474
21458
  }
21475
21459
  if (part.type === "tool-userTool") {
21476
- return /* @__PURE__ */ jsx23(PuckTool, __spreadValues({}, part));
21460
+ return /* @__PURE__ */ jsx22(PuckTool, __spreadValues({}, part));
21477
21461
  }
21478
21462
  return null;
21479
21463
  }
@@ -21485,27 +21469,27 @@ function PuckTool({
21485
21469
  const toolStatus = useContext3(toolStatusContext)[toolCallId];
21486
21470
  const outputObj = output;
21487
21471
  const status = outputObj && "status" in outputObj ? outputObj.status : toolStatus != null ? toolStatus : { loading: true, label: defaultLabel };
21488
- return /* @__PURE__ */ jsx23(ToolStatus, { status });
21472
+ return /* @__PURE__ */ jsx22(ToolStatus, { status });
21489
21473
  }
21490
21474
  function ToolStatus({ status }) {
21491
- return /* @__PURE__ */ jsx23("div", { className: cxMessage("data"), children: /* @__PURE__ */ jsxs12("div", { className: cxMessage("dataInner"), children: [
21492
- /* @__PURE__ */ jsx23("div", { className: cxMessage("dataIcon"), children: status.error ? /* @__PURE__ */ jsx23(TriangleAlert, { size: 18 }) : status.loading ? /* @__PURE__ */ jsx23(Loader, { size: 16 }) : /* @__PURE__ */ jsx23(Check, { size: 18 }) }),
21493
- /* @__PURE__ */ jsx23("div", { children: status.label })
21475
+ return /* @__PURE__ */ jsx22("div", { className: cxMessage("data"), children: /* @__PURE__ */ jsxs12("div", { className: cxMessage("dataInner"), children: [
21476
+ /* @__PURE__ */ jsx22("div", { className: cxMessage("dataIcon"), children: status.error ? /* @__PURE__ */ jsx22(TriangleAlert, { size: 18 }) : status.loading ? /* @__PURE__ */ jsx22(Loader, { size: 16 }) : /* @__PURE__ */ jsx22(Check, { size: 18 }) }),
21477
+ /* @__PURE__ */ jsx22("div", { children: status.label })
21494
21478
  ] }) });
21495
21479
  }
21496
21480
  function ExamplePrompt({
21497
21481
  label,
21498
21482
  href
21499
21483
  }) {
21500
- return /* @__PURE__ */ jsxs12("a", { className: cx5("examplePrompt"), href, children: [
21501
- /* @__PURE__ */ jsx23("div", { children: label }),
21502
- /* @__PURE__ */ jsx23("div", { className: cx5("examplePromptArrow"), children: /* @__PURE__ */ jsx23(ArrowRight, { size: "16" }) })
21484
+ return /* @__PURE__ */ jsxs12("a", { className: cx4("examplePrompt"), href, children: [
21485
+ /* @__PURE__ */ jsx22("div", { children: label }),
21486
+ /* @__PURE__ */ jsx22("div", { className: cx4("examplePromptArrow"), children: /* @__PURE__ */ jsx22(ArrowRight, { size: "16" }) })
21503
21487
  ] });
21504
21488
  }
21505
21489
 
21506
21490
  // src/components/Chat/index.tsx
21507
21491
  import qler from "qler";
21508
- import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
21492
+ import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
21509
21493
  var q = qler();
21510
21494
  var BENCHMARK = false;
21511
21495
  var prefixedUlid = (prefix = "") => `${prefix ? `${prefix}_` : ""}${ulid3()}`;
@@ -21519,9 +21503,9 @@ function Chat2({
21519
21503
  }) {
21520
21504
  const puckDispatch = usePuck((s) => s.dispatch);
21521
21505
  const getPuck = useGetPuck();
21522
- const localChatId = useRef7(chatId);
21523
- const inputRef = useRef7(null);
21524
- const pluginRef = useRef7(null);
21506
+ const localChatId = useRef6(chatId);
21507
+ const inputRef = useRef6(null);
21508
+ const pluginRef = useRef6(null);
21525
21509
  const [error45, setError] = useState10();
21526
21510
  const [toolStatus, setToolStatus] = useState10({});
21527
21511
  const { messages, status, sendMessage, regenerate } = useChat({
@@ -21733,7 +21717,7 @@ function Chat2({
21733
21717
  console.error(e);
21734
21718
  });
21735
21719
  };
21736
- const messagesWithStatuses = useMemo3(() => {
21720
+ const messagesWithStatuses = useMemo(() => {
21737
21721
  return messages.map((msg) => {
21738
21722
  return __spreadProps(__spreadValues({}, msg), {
21739
21723
  parts: msg.parts.map((part) => {
@@ -21746,21 +21730,21 @@ function Chat2({
21746
21730
  });
21747
21731
  }, [messages, toolStatus]);
21748
21732
  return /* @__PURE__ */ jsxs13("div", { className: getClassName16(), ref: pluginRef, children: [
21749
- /* @__PURE__ */ jsx24("div", { className: getClassName16("header"), children: "AI page builder" }),
21750
- /* @__PURE__ */ jsx24(ToolStatusProvider, { value: toolStatus, children: /* @__PURE__ */ jsx24(
21733
+ /* @__PURE__ */ jsx23("div", { className: getClassName16("header"), children: "AI page builder" }),
21734
+ /* @__PURE__ */ jsx23(ToolStatusProvider, { value: toolStatus, children: /* @__PURE__ */ jsx23(
21751
21735
  ChatBody,
21752
21736
  {
21753
21737
  messages: messagesWithStatuses,
21754
21738
  handleSubmit,
21755
21739
  inputRef,
21756
21740
  status,
21757
- examplePrompts: examplePrompts == null ? void 0 : examplePrompts.map(({ label, href }) => /* @__PURE__ */ jsx24(ExamplePrompt, { label, href }, label)),
21741
+ examplePrompts: examplePrompts == null ? void 0 : examplePrompts.map(({ label, href }) => /* @__PURE__ */ jsx23(ExamplePrompt, { label, href }, label)),
21758
21742
  error: error45,
21759
21743
  handleRetry: () => {
21760
21744
  setError("");
21761
21745
  regenerate();
21762
21746
  },
21763
- children: /* @__PURE__ */ jsx24(
21747
+ children: /* @__PURE__ */ jsx23(
21764
21748
  Placeholder,
21765
21749
  {
21766
21750
  dispatch: puckDispatch,
@@ -21792,10 +21776,10 @@ function Placeholder({
21792
21776
  }, 10);
21793
21777
  };
21794
21778
  return /* @__PURE__ */ jsxs13("div", { className: getClassName16("placeholder"), children: [
21795
- /* @__PURE__ */ jsx24(Bot, { size: "24" }),
21796
- /* @__PURE__ */ jsx24("div", { children: "Use AI to build a page using your own components" }),
21779
+ /* @__PURE__ */ jsx23(Bot, { size: "24" }),
21780
+ /* @__PURE__ */ jsx23("div", { children: "Use AI to build a page using your own components" }),
21797
21781
  /* @__PURE__ */ jsxs13("div", { className: getClassName16("actions"), children: [
21798
- /* @__PURE__ */ jsx24(
21782
+ /* @__PURE__ */ jsx23(
21799
21783
  "button",
21800
21784
  {
21801
21785
  className: getClassName16("action"),
@@ -21803,7 +21787,7 @@ function Placeholder({
21803
21787
  children: "Enter prompt"
21804
21788
  }
21805
21789
  ),
21806
- /* @__PURE__ */ jsx24(
21790
+ /* @__PURE__ */ jsx23(
21807
21791
  "button",
21808
21792
  {
21809
21793
  className: getClassName16("actionOutlined"),
@@ -21827,13 +21811,13 @@ function isScrolledIntoView(el) {
21827
21811
  }
21828
21812
 
21829
21813
  // src/index.tsx
21830
- import { jsx as jsx25 } from "react/jsx-runtime";
21814
+ import { jsx as jsx24 } from "react/jsx-runtime";
21831
21815
  function createAIPlugin(opts) {
21832
21816
  return {
21833
21817
  label: "AI",
21834
21818
  name: "ai",
21835
- render: () => /* @__PURE__ */ jsx25(Chat2, __spreadValues({}, opts)),
21836
- icon: /* @__PURE__ */ jsx25(Bot, {}),
21819
+ render: () => /* @__PURE__ */ jsx24(Chat2, __spreadValues({}, opts)),
21820
+ icon: /* @__PURE__ */ jsx24(Bot, {}),
21837
21821
  mobilePanelHeight: "min-content"
21838
21822
  };
21839
21823
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puckeditor/plugin-ai",
3
- "version": "0.1.0-canary.edb4f9bd",
3
+ "version": "0.1.0-canary.f39908a2",
4
4
  "author": "Chris Villa <chris@puckeditor.com>",
5
5
  "repository": "puckeditor/puck",
6
6
  "bugs": "https://github.com/puckeditor/puck/issues",