@puckeditor/plugin-pages 0.6.1-canary.ced08d75 → 0.6.1-canary.ee6f7b13

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.mjs CHANGED
@@ -4641,7 +4641,7 @@ var toastManager = index_parts_exports.createToastManager();
4641
4641
  // ../platform-client/components/Toast/Toast.tsx
4642
4642
  init_react_import();
4643
4643
 
4644
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Toast/Toast.module.css#css-module
4644
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Toast/Toast.module.css#css-module
4645
4645
  init_react_import();
4646
4646
  var Toast_module_default = { "Viewport": "_Viewport_13rvx_1", "Toast": "_Toast_13rvx_17", "Title": "_Title_13rvx_95", "Description": "_Description_13rvx_102", "Action": "_Action_13rvx_109", "Close": "_Close_13rvx_143", "Icon": "_Icon_13rvx_163" };
4647
4647
 
@@ -4702,7 +4702,7 @@ init_react_import();
4702
4702
  // ../platform-client/components/ActionModal/ActionModal.tsx
4703
4703
  init_react_import();
4704
4704
 
4705
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/ActionModal/ActionModal.module.css#css-module
4705
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/ActionModal/ActionModal.module.css#css-module
4706
4706
  init_react_import();
4707
4707
  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" };
4708
4708
 
@@ -4746,7 +4746,7 @@ var get_class_name_factory_default = getClassNameFactory;
4746
4746
  // ../platform-client/components/Modal/Modal.tsx
4747
4747
  init_react_import();
4748
4748
 
4749
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Modal/Modal.module.css#css-module
4749
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Modal/Modal.module.css#css-module
4750
4750
  init_react_import();
4751
4751
  var Modal_module_default = { "Modal-background": "_Modal-background_1bedq_1", "Modal--visible": "_Modal--visible_1bedq_16", "Modal-modal": "_Modal-modal_1bedq_22" };
4752
4752
 
@@ -4755,26 +4755,10 @@ import { createContext as createContext6, useContext as useContext7 } from "reac
4755
4755
 
4756
4756
  // ../platform-client/lib/use-modal-visible.ts
4757
4757
  init_react_import();
4758
- import { useCallback as useCallback3, useEffect as useEffect9, useRef as useRef8, useState as useState7 } from "react";
4759
- var useModalVisible = ({
4760
- defaultVisible,
4761
- visible: controlledVisible,
4762
- onVisibleChange
4763
- } = {}) => {
4764
- const [uncontrolledVisible, setUncontrolledVisible] = useState7(
4765
- defaultVisible ?? false
4766
- );
4758
+ import { useEffect as useEffect9, useState as useState7, useRef as useRef8 } from "react";
4759
+ var useModalVisible = (defaultVisible) => {
4760
+ const [visible, setVisible] = useState7(defaultVisible ?? false);
4767
4761
  const ref = useRef8(null);
4768
- const visible = controlledVisible ?? uncontrolledVisible;
4769
- const setVisible = useCallback3(
4770
- (value) => {
4771
- if (controlledVisible === void 0) {
4772
- setUncontrolledVisible(value);
4773
- }
4774
- onVisibleChange?.(value);
4775
- },
4776
- [controlledVisible, onVisibleChange]
4777
- );
4778
4762
  useEffect9(() => {
4779
4763
  if (!visible) {
4780
4764
  return;
@@ -4788,7 +4772,7 @@ var useModalVisible = ({
4788
4772
  return () => {
4789
4773
  document.body.removeEventListener("click", handler);
4790
4774
  };
4791
- }, [setVisible, visible]);
4775
+ }, [visible]);
4792
4776
  return [visible, setVisible, ref];
4793
4777
  };
4794
4778
 
@@ -4799,14 +4783,14 @@ init_react_import();
4799
4783
  init_react_import();
4800
4784
  import { useEffect as useEffect10, useState as useState8 } from "react";
4801
4785
 
4802
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Button/Button.module.css#css-module
4786
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Button/Button.module.css#css-module
4803
4787
  init_react_import();
4804
4788
  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" };
4805
4789
 
4806
4790
  // ../platform-client/components/Loader/index.tsx
4807
4791
  init_react_import();
4808
4792
 
4809
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Loader/styles.module.css#css-module
4793
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Loader/styles.module.css#css-module
4810
4794
  init_react_import();
4811
4795
  var styles_module_default = { "Loader": "_Loader_nacdm_13", "loader-animation": "_loader-animation_nacdm_1" };
4812
4796
 
@@ -4906,22 +4890,10 @@ var modalContext = createContext6({
4906
4890
  var ModalProvider = ({
4907
4891
  children,
4908
4892
  defaultVisible,
4909
- visible,
4910
- onVisibleChange,
4911
4893
  buttonVariant = "primary"
4912
4894
  }) => {
4913
- const [resolvedVisible, setVisible, ref] = useModalVisible({
4914
- defaultVisible,
4915
- visible,
4916
- onVisibleChange
4917
- });
4918
- return /* @__PURE__ */ jsx5(
4919
- modalContext.Provider,
4920
- {
4921
- value: { buttonVariant, visible: resolvedVisible, setVisible, ref },
4922
- children
4923
- }
4924
- );
4895
+ const [visible, setVisible, ref] = useModalVisible(defaultVisible);
4896
+ return /* @__PURE__ */ jsx5(modalContext.Provider, { value: { buttonVariant, visible, setVisible, ref }, children });
4925
4897
  };
4926
4898
  var useModal = () => {
4927
4899
  const { visible, setVisible } = useContext7(modalContext);
@@ -4939,7 +4911,8 @@ var Modal = ({
4939
4911
  {
4940
4912
  type: "button",
4941
4913
  variant: buttonVariant,
4942
- onClick: () => {
4914
+ onClick: (e2) => {
4915
+ e2.stopPropagation();
4943
4916
  setVisible(!visible);
4944
4917
  },
4945
4918
  children: actionLabel
@@ -4955,7 +4928,7 @@ init_react_import();
4955
4928
  // ../platform-client/components/Heading/Heading.tsx
4956
4929
  init_react_import();
4957
4930
 
4958
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Heading/Heading.module.css#css-module
4931
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Heading/Heading.module.css#css-module
4959
4932
  init_react_import();
4960
4933
  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" };
4961
4934
 
@@ -5009,7 +4982,7 @@ init_react_import();
5009
4982
  init_react_import();
5010
4983
  import React29 from "react";
5011
4984
 
5012
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Align/Align.module.css#css-module
4985
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Align/Align.module.css#css-module
5013
4986
  init_react_import();
5014
4987
  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" };
5015
4988
 
@@ -5126,9 +5099,9 @@ init_react_import();
5126
5099
  // ../platform-client/components/AutoForm/AutoForm.tsx
5127
5100
  init_react_import();
5128
5101
  import { AutoField, FieldLabel } from "@puckeditor/core";
5129
- import { useEffect as useEffect11, useState as useState9 } from "react";
5102
+ import { useEffect as useEffect11, useRef as useRef9, useState as useState9 } from "react";
5130
5103
 
5131
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/AutoForm/AutoForm.module.css#css-module
5104
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/AutoForm/AutoForm.module.css#css-module
5132
5105
  init_react_import();
5133
5106
  var AutoForm_module_default = { "AutoForm": "_AutoForm_1vmh9_1" };
5134
5107
 
@@ -5142,7 +5115,7 @@ init_react_import();
5142
5115
  // ../platform-client/components/Card/Card.tsx
5143
5116
  init_react_import();
5144
5117
 
5145
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Card/Card.module.css#css-module
5118
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Card/Card.module.css#css-module
5146
5119
  init_react_import();
5147
5120
  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" };
5148
5121
 
@@ -5187,7 +5160,7 @@ var getClassNameFactory2 = (rootClass, styles, { baseClass = "" } = {}) => (opti
5187
5160
  };
5188
5161
  var get_class_name_factory_default2 = getClassNameFactory2;
5189
5162
 
5190
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/CardSelector/styles.module.css#css-module
5163
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/CardSelector/styles.module.css#css-module
5191
5164
  init_react_import();
5192
5165
  var styles_module_default2 = { "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" };
5193
5166
 
@@ -5202,7 +5175,7 @@ init_react_import();
5202
5175
  // ../platform-client/components/Code/Code.tsx
5203
5176
  init_react_import();
5204
5177
 
5205
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Code/Code.module.css#css-module
5178
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Code/Code.module.css#css-module
5206
5179
  init_react_import();
5207
5180
  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" };
5208
5181
 
@@ -5212,7 +5185,7 @@ import { useEffect as useEffect12, useState as useState10 } from "react";
5212
5185
  import { jsx as jsx13 } from "react/jsx-runtime";
5213
5186
 
5214
5187
  // ../platform-client/components/Code/Code.tsx
5215
- import { useRef as useRef9, useState as useState11 } from "react";
5188
+ import { useRef as useRef10, useState as useState11 } from "react";
5216
5189
  import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
5217
5190
  var getClassName9 = get_class_name_factory_default2("Code", Code_module_default);
5218
5191
  var getClassNameTab = get_class_name_factory_default2("Tab", Code_module_default);
@@ -5224,7 +5197,7 @@ init_react_import();
5224
5197
  init_react_import();
5225
5198
  import { useState as useState12 } from "react";
5226
5199
 
5227
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/IconButton/IconButton.module.css#css-module
5200
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/IconButton/IconButton.module.css#css-module
5228
5201
  init_react_import();
5229
5202
  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" };
5230
5203
 
@@ -5238,7 +5211,7 @@ init_react_import();
5238
5211
  // ../platform-client/components/InfoBar/InfoBar.tsx
5239
5212
  init_react_import();
5240
5213
 
5241
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/InfoBar/InfoBar.module.css#css-module
5214
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/InfoBar/InfoBar.module.css#css-module
5242
5215
  init_react_import();
5243
5216
  var InfoBar_module_default = { "InfoBar": "_InfoBar_kchdj_1", "Info": "_Info_kchdj_1", "Info-title": "_Info-title_kchdj_21" };
5244
5217
 
@@ -5263,7 +5236,7 @@ init_react_import();
5263
5236
  // ../platform-client/components/Inline/Inline.tsx
5264
5237
  init_react_import();
5265
5238
 
5266
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Inline/Inline.module.css#css-module
5239
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Inline/Inline.module.css#css-module
5267
5240
  init_react_import();
5268
5241
  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" };
5269
5242
 
@@ -5315,7 +5288,7 @@ init_react_import();
5315
5288
  // ../platform-client/components/Link/Link.tsx
5316
5289
  init_react_import();
5317
5290
 
5318
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Link/Link.module.css#css-module
5291
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Link/Link.module.css#css-module
5319
5292
  init_react_import();
5320
5293
  var Link_module_default = { "Link": "_Link_1j70m_1" };
5321
5294
 
@@ -5327,7 +5300,7 @@ var getClassName12 = get_class_name_factory_default("Link", Link_module_default)
5327
5300
  init_react_import();
5328
5301
  import { useState as useState25 } from "react";
5329
5302
 
5330
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Menu/styles.module.css#css-module
5303
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Menu/styles.module.css#css-module
5331
5304
  init_react_import();
5332
5305
  var styles_module_default3 = { "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" };
5333
5306
 
@@ -7875,7 +7848,7 @@ init_react_import();
7875
7848
  // ../platform-client/components/Page/Page.tsx
7876
7849
  init_react_import();
7877
7850
 
7878
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Page/Page.module.css#css-module
7851
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Page/Page.module.css#css-module
7879
7852
  init_react_import();
7880
7853
  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" };
7881
7854
 
@@ -7890,7 +7863,7 @@ init_react_import();
7890
7863
  init_react_import();
7891
7864
  import { useMemo as useMemo17 } from "react";
7892
7865
 
7893
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Pagination/Pagination.module.css#css-module
7866
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Pagination/Pagination.module.css#css-module
7894
7867
  init_react_import();
7895
7868
  var Pagination_module_default = { "Pagination": "_Pagination_1okv2_1", "PaginationButton": "_PaginationButton_1okv2_8", "PaginationButton--isActive": "_PaginationButton--isActive_1okv2_20", "Pagination-ellipsis": "_Pagination-ellipsis_1okv2_30" };
7896
7869
 
@@ -7902,14 +7875,14 @@ var cxButton = getClassNameFactory("PaginationButton", Pagination_module_default
7902
7875
  // ../platform-client/components/PlanGrid/index.tsx
7903
7876
  init_react_import();
7904
7877
 
7905
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/PlanGrid/styles.module.css#css-module
7878
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/PlanGrid/styles.module.css#css-module
7906
7879
  init_react_import();
7907
7880
  var styles_module_default4 = { "PlanGrid--loading": "_PlanGrid--loading_97rn7_1", "PlanGrid-grid": "_PlanGrid-grid_97rn7_5", "PlanGrid-enterprise": "_PlanGrid-enterprise_97rn7_16" };
7908
7881
 
7909
7882
  // ../platform-client/components/PlanCard/index.tsx
7910
7883
  init_react_import();
7911
7884
 
7912
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/PlanCard/styles.module.css#css-module
7885
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/PlanCard/styles.module.css#css-module
7913
7886
  init_react_import();
7914
7887
  var styles_module_default5 = { "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" };
7915
7888
 
@@ -12881,7 +12854,7 @@ init_react_import();
12881
12854
  // ../platform-client/components/Section/Section.tsx
12882
12855
  init_react_import();
12883
12856
 
12884
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Section/Section.module.css#css-module
12857
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Section/Section.module.css#css-module
12885
12858
  init_react_import();
12886
12859
  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" };
12887
12860
 
@@ -12901,7 +12874,7 @@ init_react_import();
12901
12874
  // ../platform-client/components/Tag/Tag.tsx
12902
12875
  init_react_import();
12903
12876
 
12904
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Tag/Tag.module.css#css-module
12877
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Tag/Tag.module.css#css-module
12905
12878
  init_react_import();
12906
12879
  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" };
12907
12880
 
@@ -12952,9 +12925,9 @@ init_react_import();
12952
12925
 
12953
12926
  // ../platform-client/components/Table/Table.tsx
12954
12927
  init_react_import();
12955
- import { useEffect as useEffect28, useMemo as useMemo19, useRef as useRef20, useState as useState27 } from "react";
12928
+ import { useEffect as useEffect28, useMemo as useMemo19, useRef as useRef21, useState as useState27 } from "react";
12956
12929
 
12957
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Table/Table.module.css#css-module
12930
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Table/Table.module.css#css-module
12958
12931
  init_react_import();
12959
12932
  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" };
12960
12933
 
@@ -12972,7 +12945,7 @@ init_react_import();
12972
12945
  // ../platform-client/components/VerticalSpace/VerticalSpace.tsx
12973
12946
  init_react_import();
12974
12947
 
12975
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css#css-module
12948
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/VerticalSpace/VerticalSpace.module.css#css-module
12976
12949
  init_react_import();
12977
12950
  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" };
12978
12951
 
@@ -12983,7 +12956,7 @@ var getClassName17 = get_class_name_factory_default("VerticalSpace", VerticalSpa
12983
12956
  // ../platform-client/components/Viewport/index.tsx
12984
12957
  init_react_import();
12985
12958
 
12986
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/platform-client/components/Viewport/styles.module.css#css-module
12959
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/platform-client/components/Viewport/styles.module.css#css-module
12987
12960
  init_react_import();
12988
12961
  var styles_module_default6 = { "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" };
12989
12962
 
@@ -12997,12 +12970,12 @@ import { createContext as createContext9, useContext as useContext10, useState a
12997
12970
  import { jsx as jsx39 } from "react/jsx-runtime";
12998
12971
  var ctx = createContext9({});
12999
12972
 
13000
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/plugin-pages/src/components/PagePlugin/styles.module.css#css-module
12973
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-pages/src/components/PagePlugin/styles.module.css#css-module
13001
12974
  init_react_import();
13002
12975
  var styles_module_default7 = { "Pages": "_Pages_ey49w_5", "Pages-addPage": "_Pages-addPage_ey49w_12", "Pages-loader": "_Pages-loader_ey49w_18", "Pages-list": "_Pages-list_ey49w_26", "Pages-search": "_Pages-search_ey49w_34", "Pages-searchInput": "_Pages-searchInput_ey49w_38", "PagesPage": "_PagesPage_ey49w_59", "PagesPage--expanded": "_PagesPage--expanded_ey49w_69", "PagesPage-versions": "_PagesPage-versions_ey49w_73", "PagesPage-header": "_PagesPage-header_ey49w_96", "PagesPage--active": "_PagesPage--active_ey49w_124", "PagesPage-headerMain": "_PagesPage-headerMain_ey49w_137", "PagesPage-headerIcon": "_PagesPage-headerIcon_ey49w_144", "PagesPage-loader": "_PagesPage-loader_ey49w_148", "PagesVersion": "_PagesVersion_ey49w_174", "PagesVersion-inner": "_PagesVersion-inner_ey49w_174", "PagesVersion--current": "_PagesVersion--current_ey49w_189", "PagesVersion-header": "_PagesVersion-header_ey49w_204", "PagesVersion-version": "_PagesVersion-version_ey49w_210", "PagesVersion-date": "_PagesVersion-date_ey49w_216" };
13003
12976
 
13004
12977
  // src/components/PagePlugin/index.tsx
13005
- import { useCallback as useCallback10, useEffect as useEffect29, useMemo as useMemo22, useRef as useRef21, useState as useState30 } from "react";
12978
+ import { useCallback as useCallback9, useEffect as useEffect29, useMemo as useMemo22, useRef as useRef22, useState as useState30 } from "react";
13006
12979
  import { resolveAllData as resolveAllData2, useGetPuck as useGetPuck2 } from "@puckeditor/core";
13007
12980
 
13008
12981
  // src/components/CreateForm/index.tsx
@@ -26961,7 +26934,7 @@ var usePagesStore = create((set3) => ({
26961
26934
  setSearchQuery: (query) => set3({ searchQuery: query })
26962
26935
  }));
26963
26936
 
26964
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/plugin-pages/src/components/CreateForm/styles.module.css#css-module
26937
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-pages/src/components/CreateForm/styles.module.css#css-module
26965
26938
  init_react_import();
26966
26939
  var styles_module_default8 = { "CreateForm": "_CreateForm_kkdt2_1", "CreateForm-field": "_CreateForm-field_kkdt2_5", "CreateForm-label": "_CreateForm-label_kkdt2_13", "CreateForm-input": "_CreateForm-input_kkdt2_20", "CreateForm-error": "_CreateForm-error_kkdt2_43" };
26967
26940
 
@@ -27098,9 +27071,9 @@ var useSiteId = () => useMemo20(() => {
27098
27071
  // src/components/ConfirmModal/index.tsx
27099
27072
  init_react_import();
27100
27073
 
27101
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/plugin-pages/src/components/ConfirmModal/styles.module.css#css-module
27074
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-pages/src/components/ConfirmModal/styles.module.css#css-module
27102
27075
  init_react_import();
27103
- var styles_module_default9 = { "ConfirmModal-close": "_ConfirmModal-close_1tbjv_1", "ConfirmModal-actions": "_ConfirmModal-actions_1tbjv_24", "ConfirmModal-body": "_ConfirmModal-body_1tbjv_29" };
27076
+ var styles_module_default9 = { "ConfirmModal": "_ConfirmModal_1r63q_1", "ConfirmModal-button": "_ConfirmModal-button_1r63q_5", "ConfirmModal-background": "_ConfirmModal-background_1r63q_9", "ConfirmModal-modal": "_ConfirmModal-modal_1r63q_22", "ConfirmModal-header": "_ConfirmModal-header_1r63q_33", "ConfirmModal-close": "_ConfirmModal-close_1r63q_42", "ConfirmModal-body": "_ConfirmModal-body_1r63q_65", "ConfirmModal-footer": "_ConfirmModal-footer_1r63q_71" };
27104
27077
 
27105
27078
  // src/components/ConfirmModal/index.tsx
27106
27079
  import { jsx as jsx42, jsxs as jsxs20 } from "react/jsx-runtime";
@@ -27113,51 +27086,44 @@ var ConfirmModal = ({
27113
27086
  title = "Unsaved changes",
27114
27087
  visible
27115
27088
  }) => {
27116
- if (!visible) {
27117
- return null;
27118
- }
27119
- return /* @__PURE__ */ jsx42(
27120
- ModalProvider,
27089
+ return /* @__PURE__ */ jsx42("div", { className: cx8(), children: visible ? /* @__PURE__ */ jsx42(
27090
+ "div",
27121
27091
  {
27122
- visible,
27123
- onVisibleChange: (nextVisible) => {
27124
- if (!nextVisible) {
27092
+ className: cx8("background"),
27093
+ onClick: (event) => {
27094
+ if (event.target === event.currentTarget) {
27125
27095
  onClose();
27126
27096
  }
27127
27097
  },
27128
- children: /* @__PURE__ */ jsx42(
27129
- ActionModal,
27130
- {
27131
- title,
27132
- hideButton: true,
27133
- actions: /* @__PURE__ */ jsxs20("div", { className: cx8("actions"), children: [
27134
- /* @__PURE__ */ jsx42(
27135
- "button",
27136
- {
27137
- className: cx8("close"),
27138
- type: "button",
27139
- "aria-label": "Close confirmation modal",
27140
- onClick: onClose,
27141
- children: "Cancel"
27142
- }
27143
- ),
27144
- /* @__PURE__ */ jsx42(
27145
- Button,
27146
- {
27147
- type: "button",
27148
- onClick: async () => {
27149
- await onConfirm?.();
27150
- onClose();
27151
- },
27152
- children: confirmLabel
27153
- }
27154
- )
27155
- ] }),
27156
- children: /* @__PURE__ */ jsx42("div", { className: cx8("body"), children: message2 })
27157
- }
27158
- )
27098
+ children: /* @__PURE__ */ jsxs20("div", { className: cx8("modal"), children: [
27099
+ /* @__PURE__ */ jsx42("div", { className: cx8("header"), children: /* @__PURE__ */ jsx42(Heading, { size: "s", children: title }) }),
27100
+ /* @__PURE__ */ jsx42("div", { className: cx8("body"), children: message2 }),
27101
+ /* @__PURE__ */ jsxs20("div", { className: cx8("footer"), children: [
27102
+ /* @__PURE__ */ jsx42(
27103
+ "button",
27104
+ {
27105
+ className: cx8("close"),
27106
+ type: "button",
27107
+ "aria-label": "Close confirmation modal",
27108
+ onClick: onClose,
27109
+ children: "Cancel"
27110
+ }
27111
+ ),
27112
+ /* @__PURE__ */ jsx42(
27113
+ Button,
27114
+ {
27115
+ type: "button",
27116
+ onClick: async () => {
27117
+ await onConfirm?.();
27118
+ onClose();
27119
+ },
27120
+ children: confirmLabel
27121
+ }
27122
+ )
27123
+ ] })
27124
+ ] })
27159
27125
  }
27160
- );
27126
+ ) : null });
27161
27127
  };
27162
27128
 
27163
27129
  // src/lib/request-token.ts
@@ -29316,7 +29282,7 @@ var PagePlugin = (opts) => {
29316
29282
  const getPuck = useGetPuck2();
29317
29283
  const [confirmModalOpen, setConfirmModalOpen] = useState30(false);
29318
29284
  const [pendingNavigation, setPendingNavigation] = useState30(null);
29319
- const lastRequestedPathRef = useRef21(void 0);
29285
+ const lastRequestedPathRef = useRef22(void 0);
29320
29286
  const parentOrigin = opts?.parentOrigin ?? "https://cloud.puckeditor.com";
29321
29287
  const siteIdHeader = useSiteId();
29322
29288
  const path = usePath();
@@ -29348,11 +29314,11 @@ var PagePlugin = (opts) => {
29348
29314
  }
29349
29315
  return void 0;
29350
29316
  }, [activePage, activeVersion, pagesData]);
29351
- const postToParent = useCallback10(
29317
+ const postToParent = useCallback9(
29352
29318
  (message2) => postMessageToParent({ parentOrigin, ...message2 }),
29353
29319
  [parentOrigin]
29354
29320
  );
29355
- const getPageState = useCallback10(
29321
+ const getPageState = useCallback9(
29356
29322
  async (data) => {
29357
29323
  const { appState, config: config2 } = getPuck();
29358
29324
  const resolvedData = await resolveAllData2(
@@ -29371,7 +29337,7 @@ var PagePlugin = (opts) => {
29371
29337
  },
29372
29338
  [getPuck, resolveAllData2]
29373
29339
  );
29374
- const pushPageHistoryState = useCallback10(
29340
+ const pushPageHistoryState = useCallback9(
29375
29341
  async (data) => {
29376
29342
  const { history, dispatch } = getPuck();
29377
29343
  const nextState = await getPageState(data);
@@ -29387,7 +29353,7 @@ var PagePlugin = (opts) => {
29387
29353
  const q2 = searchQuery.toLowerCase();
29388
29354
  return pagesData.filter((page) => page.path.toLowerCase().includes(q2));
29389
29355
  }, [pagesData, searchQuery]);
29390
- const handleRead = useCallback10(
29356
+ const handleRead = useCallback9(
29391
29357
  async (path2) => {
29392
29358
  await waitForParentReady(parentOrigin);
29393
29359
  const token = await requestToken(parentOrigin);
@@ -29455,7 +29421,7 @@ var PagePlugin = (opts) => {
29455
29421
  useEffect29(() => {
29456
29422
  setExpandedPage(activePage);
29457
29423
  }, [activePage, setExpandedPage]);
29458
- const performPageSwitch = useCallback10(
29424
+ const performPageSwitch = useCallback9(
29459
29425
  (page) => {
29460
29426
  if (page.path === activePage) return;
29461
29427
  const selectedPage = pagesData.find(
@@ -29486,7 +29452,7 @@ var PagePlugin = (opts) => {
29486
29452
  setExpandedPage
29487
29453
  ]
29488
29454
  );
29489
- const performVersionSwitch = useCallback10(
29455
+ const performVersionSwitch = useCallback9(
29490
29456
  (page, version3) => {
29491
29457
  if (version3.id === currentVersion?.id) return;
29492
29458
  const selectedPage = pagesData.find(
@@ -29501,7 +29467,7 @@ var PagePlugin = (opts) => {
29501
29467
  },
29502
29468
  [currentVersion?.id, pagesData, pushPageHistoryState, setActiveVersion]
29503
29469
  );
29504
- const requiresSwitchConfirmation = useCallback10(() => {
29470
+ const requiresSwitchConfirmation = useCallback9(() => {
29505
29471
  if (currentVersion?.isNew) return true;
29506
29472
  const { history, appState } = getPuck();
29507
29473
  if (currentVersion && history.histories.length > 1) {
@@ -29509,7 +29475,7 @@ var PagePlugin = (opts) => {
29509
29475
  }
29510
29476
  return false;
29511
29477
  }, [currentVersion, getPuck]);
29512
- const onPageClick = useCallback10(
29478
+ const onPageClick = useCallback9(
29513
29479
  (page) => {
29514
29480
  if (page.path === activePage) {
29515
29481
  setExpandedPage((s2) => s2 === page.path ? "" : page.path);
@@ -29524,7 +29490,7 @@ var PagePlugin = (opts) => {
29524
29490
  },
29525
29491
  [activePage, performPageSwitch, requiresSwitchConfirmation, setExpandedPage]
29526
29492
  );
29527
- const onVersionClick = useCallback10(
29493
+ const onVersionClick = useCallback9(
29528
29494
  (page, version3) => {
29529
29495
  if (version3.id === currentVersion?.id) return;
29530
29496
  if (requiresSwitchConfirmation()) {
@@ -29541,7 +29507,7 @@ var PagePlugin = (opts) => {
29541
29507
  setPendingNavigation
29542
29508
  ]
29543
29509
  );
29544
- const handleConfirmNavigation = useCallback10(async () => {
29510
+ const handleConfirmNavigation = useCallback9(async () => {
29545
29511
  const action = pendingNavigation;
29546
29512
  setPendingNavigation(null);
29547
29513
  if (!action) return;
@@ -29646,11 +29612,11 @@ var PagePlugin = (opts) => {
29646
29612
  // src/components/HeaderActions/index.tsx
29647
29613
  init_react_import();
29648
29614
  import { createUsePuck, useGetPuck as useGetPuck3 } from "@puckeditor/core";
29649
- import { useMemo as useMemo23, useRef as useRef22, useState as useState31 } from "react";
29615
+ import { useMemo as useMemo23, useRef as useRef23, useState as useState31 } from "react";
29650
29616
 
29651
- // css-module:/Users/chrisvilla/Projects/puck-platform/packages/plugin-pages/src/components/HeaderActions/styles.module.css#css-module
29617
+ // css-module:/home/runner/work/puck-platform/puck-platform/packages/plugin-pages/src/components/HeaderActions/styles.module.css#css-module
29652
29618
  init_react_import();
29653
- var styles_module_default10 = { "HeaderActions": "_HeaderActions_1dhws_1", "HeaderActions-trigger": "_HeaderActions-trigger_1dhws_7", "HeaderActions-versionHeader": "_HeaderActions-versionHeader_1dhws_19", "HeaderActions-versionLabel": "_HeaderActions-versionLabel_1dhws_26", "HeaderActions-versionDate": "_HeaderActions-versionDate_1dhws_33" };
29619
+ var styles_module_default10 = { "HeaderActions-publish": "_HeaderActions-publish_7nzbl_1", "HeaderActions-trigger": "_HeaderActions-trigger_7nzbl_7", "HeaderActions-versionHeader": "_HeaderActions-versionHeader_7nzbl_19", "HeaderActions-versionLabel": "_HeaderActions-versionLabel_7nzbl_26", "HeaderActions-versionDate": "_HeaderActions-versionDate_7nzbl_33" };
29654
29620
 
29655
29621
  // src/components/HeaderActions/index.tsx
29656
29622
  import { Fragment as Fragment9, jsx as jsx44, jsxs as jsxs22 } from "react/jsx-runtime";
@@ -29842,7 +29808,7 @@ var HeaderActions = (opts) => {
29842
29808
  const defaultVersion = getDefaultPageVersion(resolvedPage);
29843
29809
  replaceEditorState(defaultVersion?.data);
29844
29810
  };
29845
- const saving = useRef22(false);
29811
+ const saving = useRef23(false);
29846
29812
  const handleSaveDraft = async () => {
29847
29813
  if (saving.current) return;
29848
29814
  const path = activePage;
@@ -29879,7 +29845,7 @@ var HeaderActions = (opts) => {
29879
29845
  saving.current = false;
29880
29846
  }
29881
29847
  };
29882
- const publishing = useRef22(false);
29848
+ const publishing = useRef23(false);
29883
29849
  const handlePublish = async () => {
29884
29850
  if (publishing.current) return;
29885
29851
  const path = activePage;
@@ -30010,17 +29976,6 @@ var HeaderActions = (opts) => {
30010
29976
  title: "Unpublish page"
30011
29977
  };
30012
29978
  return /* @__PURE__ */ jsxs22(Fragment9, { children: [
30013
- /* @__PURE__ */ jsx44(
30014
- ConfirmModal,
30015
- {
30016
- visible: confirmAction !== null,
30017
- onClose: () => setConfirmAction(null),
30018
- confirmLabel: confirmConfig.confirmLabel,
30019
- message: confirmConfig.message,
30020
- onConfirm: confirmConfig.onConfirm,
30021
- title: confirmConfig.title
30022
- }
30023
- ),
30024
29979
  canvasIsDirty ? /* @__PURE__ */ jsxs22(Fragment9, { children: [
30025
29980
  /* @__PURE__ */ jsxs22("div", { className: cx10("version"), children: [
30026
29981
  /* @__PURE__ */ jsx44("div", { className: cx10("versionHeader"), children: /* @__PURE__ */ jsx44("div", { className: cx10("versionLabel"), children: "Draft" }) }),
@@ -30050,7 +30005,7 @@ var HeaderActions = (opts) => {
30050
30005
  ] }),
30051
30006
  /* @__PURE__ */ jsx44("div", { className: cx10("versionDate"), children: currentVersion.createdAt ? format(currentVersion.createdAt, "MMM d yyy, HH:mm") : "" })
30052
30007
  ] }) }) : null,
30053
- /* @__PURE__ */ jsxs22("div", { className: cx10(), children: [
30008
+ /* @__PURE__ */ jsxs22("div", { className: cx10("publish"), children: [
30054
30009
  /* @__PURE__ */ jsx44(
30055
30010
  Button,
30056
30011
  {
@@ -30087,6 +30042,17 @@ var HeaderActions = (opts) => {
30087
30042
  ],
30088
30043
  children: /* @__PURE__ */ jsx44("span", { className: cx10("trigger"), children: /* @__PURE__ */ jsx44(ChevronDown, { size: 16 }) })
30089
30044
  }
30045
+ ),
30046
+ /* @__PURE__ */ jsx44(
30047
+ ConfirmModal,
30048
+ {
30049
+ visible: confirmAction !== null,
30050
+ onClose: () => setConfirmAction(null),
30051
+ confirmLabel: confirmConfig.confirmLabel,
30052
+ message: confirmConfig.message,
30053
+ onConfirm: confirmConfig.onConfirm,
30054
+ title: confirmConfig.title
30055
+ }
30090
30056
  )
30091
30057
  ] })
30092
30058
  ] });