@ckc-net/puck-extended 0.1.0 → 0.1.2

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.d.ts CHANGED
@@ -3,8 +3,8 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
3
  import { Checkbox } from "@base-ui/react/checkbox";
4
4
  import { Radio } from "@base-ui/react/radio";
5
5
  import { RadioGroup } from "@base-ui/react/radio-group";
6
- import * as _measured_puck0 from "@measured/puck";
7
- import { Fields } from "@measured/puck";
6
+ import * as _puckeditor_core0 from "@puckeditor/core";
7
+ import { Fields } from "@puckeditor/core";
8
8
 
9
9
  //#region src/components/ui/checkbox.d.ts
10
10
  type CheckboxLayout = "horizontal" | "inline";
@@ -88,9 +88,9 @@ declare const createPuckOverridesPlugin: () => {
88
88
  readOnly,
89
89
  field,
90
90
  label
91
- }: (_measured_puck0.FieldProps<_measured_puck0.Field<any>> & {
91
+ }: (_puckeditor_core0.FieldProps<_puckeditor_core0.Field<any>> & {
92
92
  name: string;
93
- field: _measured_puck0.Field<any> & {
93
+ field: _puckeditor_core0.Field<any> & {
94
94
  options?: ReadonlyArray<{
95
95
  label: React.ReactNode;
96
96
  value: any;
@@ -119,9 +119,9 @@ declare const createPuckOverridesPlugin: () => {
119
119
  readOnly,
120
120
  field,
121
121
  label
122
- }: (_measured_puck0.FieldProps<_measured_puck0.Field<any>> & {
122
+ }: (_puckeditor_core0.FieldProps<_puckeditor_core0.Field<any>> & {
123
123
  name: string;
124
- field: _measured_puck0.Field<any> & {
124
+ field: _puckeditor_core0.Field<any> & {
125
125
  options?: ReadonlyArray<{
126
126
  label: React.ReactNode;
127
127
  value: any;
@@ -234,15 +234,15 @@ declare const TablePagination: ({
234
234
  //#endregion
235
235
  //#region src/utils/display.d.ts
236
236
  type DisplayTraitProps = {
237
- display?: 'hidden' | 'inline' | 'inline-block' | 'block' | 'flex' | 'inline-flex';
237
+ display?: "hidden" | "inline" | "inline-block" | "block" | "flex" | "inline-flex";
238
238
  };
239
239
  declare const displayField: Fields;
240
- declare function displayToClasses(display?: 'hidden' | 'inline' | 'inline-block' | 'block' | 'flex' | 'inline-flex'): string;
240
+ declare function displayToClasses(display?: "hidden" | "inline" | "inline-block" | "block" | "flex" | "inline-flex"): string;
241
241
  declare const displayDefaultProps: DisplayTraitProps;
242
242
  //#endregion
243
243
  //#region src/utils/fontWeight.d.ts
244
244
  type FontWeightTraitProps = {
245
- fontWeight?: '' | 'thin' | 'extralight' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
245
+ fontWeight?: "" | "thin" | "extralight" | "light" | "normal" | "medium" | "semibold" | "bold" | "extrabold" | "black";
246
246
  };
247
247
  declare const fontWeightField: Fields;
248
248
  declare function fontWeightToClasses(fontWeight?: string): string;
@@ -285,8 +285,8 @@ type PaddingValue = {
285
285
  unit: string;
286
286
  };
287
287
  type PaddingItem = {
288
- breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
289
- direction: 'all' | 'top' | 'right' | 'bottom' | 'left' | 'x' | 'y';
288
+ breakpoint?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
289
+ direction: "all" | "top" | "right" | "bottom" | "left" | "x" | "y";
290
290
  padding: PaddingValue;
291
291
  };
292
292
  type PaddingsTraitProps = {
@@ -300,7 +300,7 @@ declare const paddingsDefaultProps: {
300
300
  //#endregion
301
301
  //#region src/utils/position.d.ts
302
302
  type PositionTraitProps = {
303
- position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
303
+ position?: "static" | "relative" | "absolute" | "fixed" | "sticky";
304
304
  top?: string;
305
305
  right?: string;
306
306
  bottom?: string;
@@ -308,7 +308,7 @@ type PositionTraitProps = {
308
308
  zIndex?: number;
309
309
  };
310
310
  declare const positionField: Fields;
311
- declare function positionToClasses(position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky', top?: string, right?: string, bottom?: string, left?: string, zIndex?: number): string;
311
+ declare function positionToClasses(position?: "static" | "relative" | "absolute" | "fixed" | "sticky", top?: string, right?: string, bottom?: string, left?: string, zIndex?: number): string;
312
312
  declare const positionDefaultProps: PositionTraitProps;
313
313
  //#endregion
314
314
  //#region src/utils/size.d.ts
@@ -331,8 +331,8 @@ declare const sizeDefaultProps: SizeTraitProps;
331
331
  //#region src/utils/spacing.d.ts
332
332
  type SpacingTraitProps = MarginsTraitProps & PaddingsTraitProps;
333
333
  declare const spacingFields: {
334
- [x: string]: _measured_puck0.Field<any, {}>;
335
- [x: number]: _measured_puck0.Field<any, {}>;
334
+ [x: string]: _puckeditor_core0.Field<any, {}>;
335
+ [x: number]: _puckeditor_core0.Field<any, {}>;
336
336
  };
337
337
  declare const spacingDefaultProps: {
338
338
  paddings: Array<PaddingItem>;
@@ -398,8 +398,8 @@ declare const textTransformDefaultProps: {
398
398
  //#region src/utils/typography.d.ts
399
399
  type TypographyTraitProps = TextAlignTraitProps & TextTransformTraitProps & TextDecorationTraitProps & TextSizeTraitProps & TextColorTraitProps & LineHeightTraitProps & FontWeightTraitProps;
400
400
  declare const typographyFields: {
401
- [x: string]: _measured_puck0.Field<any, {}>;
402
- [x: number]: _measured_puck0.Field<any, {}>;
401
+ [x: string]: _puckeditor_core0.Field<any, {}>;
402
+ [x: number]: _puckeditor_core0.Field<any, {}>;
403
403
  };
404
404
  declare const typographyDefaultProps: {
405
405
  fontWeight: "";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/ui/checkbox.tsx","../src/components/Fields/NumberUnit/index.tsx","../src/components/ui/radio.tsx","../src/overrides/plugin.tsx","../src/components/Fields/Label/index.tsx","../src/components/MediaPicker/index.tsx","../src/components/Pagination/index.tsx","../src/utils/display.tsx","../src/utils/fontWeight.tsx","../src/utils/lineHeight.tsx","../src/utils/margins.tsx","../src/utils/paddings.tsx","../src/utils/position.tsx","../src/utils/size.tsx","../src/utils/spacing.tsx","../src/utils/spacingOptions.ts","../src/utils/textAlign.tsx","../src/utils/textColor.tsx","../src/utils/textDecoration.tsx","../src/utils/textSize.tsx","../src/utils/textTransform.tsx","../src/utils/typography.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KAOK,cAAA;;;KCOO,eAAA;;;;;;KCPP,WAAA;;;cCIC;;;;;;;;;8BAiBF;mBAAA,MAAA,CACK;;;;;;;QHtBJ,QAAc,kBAAA;;;;MCOP,KAAA,EAAA,CAAA;QAAe;OAAA,EAAA;;;;;;QCPtB,QAAW,kBAAA;;;;ICIV,MAAA,EAAA,CAAA;MAAA;KAAA,EAAA;gBAIyC,KAAA,CAAM;UAAW,kBAAA,CAAA,GAAA,CAAA;;;;;MAa5D,IAAA,EAAA,MAAA;MACK,IAAA,CAAA,EAtBoB,KAAA,CAAA,SAsBpB;;;;;;;;;;;;;;;;gBAHiB,KAAA,CAAM;;UAEnB,kBAAA,CAAA,GAAA,CAAA;;MAbwC,QAAA,EAAA,CAAA;QAAA,QAAA;QAAA,KAAA;QAAA,QAAA;QAAA,KAAA;QAAA;MAWrB,CAXqB,EAAA,2BAAA,sBAAA,CAAA,GAAA,CAAA,CAAA,GAAA;QAAW,IAAA,EAAA,MAAA;;oBAVxB;YAEX,KAAA,iBAAA;;;mBAFW;;;;MAqBR,CAAA,EAAA,oCAAA,IAAA;MAEnB,UAAA,EAAA,CAAA;QAAA,QAAA;QAAA,KAAA;QAAA,KAAA;QAAA,KAAA;QAAA;OAAA,EAAA;;;;;;;;;;;;;;;;UAvB2B,OAAA,CAAA,EAAT,aAAS,CAAA;YAAA,KAAA,iBAAA;;;mBAAT;;;;;;;;;;;;;;;;;;;;;;;MAAA;;;;QAAA,QAAA,CAAA,EAAA,OAAA;MAAA,CAAA,EAAA,iCAAA;;;;;;;;;;;;;;;;;cCHzB;;;;;;MAAoE,kBAAA,CAAA,GAAA,CAAA;;;KCyB9D,SAAA;;;;;;;KAQA,gBAAA;;EL5BP,GAAA,CAAA,EAAA,MAAA;UK+BO;;KAohBA,gBAAA;E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C,SZfc,EYeH,MZfG;iBY0DX,aAAA,SACJ,sBACG,sBACA,oBACF,uBACG,uBACA;cAcH,kBAAkB;;;KCtFnB,iBAAA,GAAoB,oBAAoB;cAEvC;eAGZ,eAAA,CAAA;eAAA,eAAA,CAAA;;AdJI,ccMQ,mBdNM,EAAA;kBcSlB,WAAA;;;AbFW,iBaII,gBAAA,CbJW,KAAA,EaIa,ObJb,CaIqB,iBbJrB,CAAA,CAAA,EAAA,MAAA;caUd;;;cCxBA;;;;;;KCID,mBAAA;;;cAIC,gBAAgB;iBAcb,kBAAA;cAKH;;;;;KCvBD,mBAAA;;;cAIC,gBAAgB;iBAeb,kBAAA;cAKH;;;;;KClBD,wBAAA;mBACS;;cAKR,qBAAqB;iBAelB,uBAAA,kBACK;cA6BR,4BAA4B;;;KCzD7B,kBAAA;;;cAkBC,eAAe;iBAyBZ,iBAAA;cAKH;;;;;KC3CD,uBAAA;;;cAIC,oBAAoB;iBAajB,sBAAA;cAKH;;;;;KCLD,oBAAA,GAAuB,sBAC/B,0BACA,2BACA,qBACA,sBACA,uBACA;cAES;eAQZ,eAAA,CAAA;EnBnCI,CAAA,CAAA,EAAA,MAAA,CAAA,EmBmCJ,eAAA,CAAA,KnBnCe,CAAA,GAAA,EAAA,CAAA,CAAA,CAAA;;cmBqCH;;ElBjCP,UAAA,EAAA,EAAA;;;mBkByCL;elBxBG,EAAA,MAAA;EAAA,SACK,EAAA,MAAA;;iBkByBO,mBAAA,QAA2B,QAAQ;cActC"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/components/ui/checkbox.tsx","../src/components/Fields/NumberUnit/index.tsx","../src/components/ui/radio.tsx","../src/overrides/plugin.tsx","../src/components/Fields/Label/index.tsx","../src/components/MediaPicker/index.tsx","../src/components/Pagination/index.tsx","../src/utils/display.tsx","../src/utils/fontWeight.tsx","../src/utils/lineHeight.tsx","../src/utils/margins.tsx","../src/utils/paddings.tsx","../src/utils/position.tsx","../src/utils/size.tsx","../src/utils/spacing.tsx","../src/utils/spacingOptions.ts","../src/utils/textAlign.tsx","../src/utils/textColor.tsx","../src/utils/textDecoration.tsx","../src/utils/textSize.tsx","../src/utils/textTransform.tsx","../src/utils/typography.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KAOK,cAAA;;;KCOO,eAAA;;;;;;KCPP,WAAA;;;cCIC;;;;;;;;;8BAmBS;mBAAA,MAAA,CAEV;;;;;;;QHzBA,QAAc,kBAAA;;;;MCOP,KAAA,EAAA,CAAA;QAAe;OAAA,EAAA;;;;;;QCPtB,QAAW,kBAAA;;;;ICIV,MAAA,EAAA,CAAA;MAAA;KAAA,EAAA;gBAIyC,KAAA,CAAM;UAAW,kBAAA,CAAA,GAAA,CAAA;;;;;MAejD,IAAA,EAAA,MAAA;MAEV,IAAA,CAAA,EAzB0B,KAAA,CAAA,SAyB1B;;;;;;;;;;;;;;;;gBARqB,KAAA,CAAM;;UAEnB,kBAAA,CAAA,GAAA,CAAA;;MAXwC,QAAA,EAAA,CAAA;QAAA,QAAA;QAAA,KAAA;QAAA,QAAA;QAAA,KAAA;QAAA;MASrB,CATqB,EAAA,6BAAA,wBAAA,CAAA,GAAA,CAAA,CAAA,GAAA;QAAW,IAAA,EAAA,MAAA;;oBAVtB;YAEX,KAAA,iBAAA;;;mBAFW;;;;MAmBV,CAAA,EAAA,oCAAA,IAAA;MAEnB,UAAA,EAAA,CAAA;QAAA,QAAA;QAAA,KAAA;QAAA,KAAA;QAAA,KAAA;QAAA;OAAA,EAAA;;;;;;;;;;;;;;;;UArB6B,OAAA,CAAA,EAAT,aAAS,CAAA;YAAA,KAAA,iBAAA;;;mBAAT;;;;;;;;;;;;;;;;;;;;;;;MAAA;;;;QAAA,QAAA,CAAA,EAAA,OAAA;MAAA,CAAA,EAAA,iCAAA;;;;;;;;;;;;;;;;;cCH3B;;;;;;MAAoE,kBAAA,CAAA,GAAA,CAAA;;;KCyB9D,SAAA;;;;;;;KAQA,gBAAA;;EL5BP,GAAA,CAAA,EAA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aCQ,SbDM;caEH;cACA;;AZIJ,cYeC,SZfc,EYeH,MZfG;iBY0DX,aAAA,SACJ,sBACG,sBACA,oBACF,uBACG,uBACA;cAcH,kBAAkB;;;KC5EnB,iBAAA,GAAoB,oBAAoB;cAEvC;eAGZ,iBAAA,CAAA;eAAA,iBAAA,CAAA;;AddI,ccgBQ,mBdhBM,EAAA;kBcmBlB,WAAA;;;AbZW,iBacI,gBAAA,CbdW,KAAA,Eaca,Obdb,CacqB,iBbdrB,CAAA,CAAA,EAAA,MAAA;cauBd;;;cCrCA;;;;;;KCSD,mBAAA;;;cAIC,gBAAgB;iBAcb,kBAAA;cAKH;;;;;KC5BD,mBAAA;;;cAIC,gBAAgB;iBAab,kBAAA;cAKH;;;;;KChBD,wBAAA;mBACS;;cAKR,qBAAqB;iBAelB,uBAAA,kBACK;cA6BR,4BAA4B;;;KCzD7B,kBAAA;;;cAkBC,eAAe;iBAyBZ,iBAAA;cAKH;;;;;KC3CD,uBAAA;;;cAIC,oBAAoB;iBAajB,sBAAA;cAKH;;;;;KCoBD,oBAAA,GAAuB,sBAC/B,0BACA,2BACA,qBACA,sBACA,uBACA;cAES;eAQZ,iBAAA,CAAA;EnB5DI,CAAA,CAAA,EAAA,MAAA,CAAA,EmB4DJ,iBAAA,CAAA,KnB5De,CAAA,GAAA,EAAA,CAAA,CAAA,CAAA;;cmB8DH;;ElB1DP,UAAA,EAAA,EAAA;;;mBkBkEL;elB/Cc,EAAA,MAAA;EAAA,SAEV,EAAA,MAAA;;iBkB+CW,mBAAA,QACL,QAAQ;cAeN"}
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import { Radio } from "@base-ui/react/radio";
10
10
  import { RadioGroup } from "@base-ui/react/radio-group";
11
11
  import { Field } from "@base-ui/react/field";
12
12
  import { mergeProps } from "@base-ui/react/merge-props";
13
- import { createUsePuck } from "@measured/puck";
13
+ import { createUsePuck } from "@puckeditor/core";
14
14
  import { Tabs } from "@base-ui/react/tabs";
15
15
  import { Accordion } from "@base-ui/react/accordion";
16
16
  import { Tooltip } from "@base-ui/react/tooltip";
@@ -31,7 +31,7 @@ function Label$2({ className, readOnly, children, ...props }) {
31
31
  return /* @__PURE__ */ jsxs("label", {
32
32
  "data-slot": "label",
33
33
  "data-readonly": readOnly ? "" : void 0,
34
- className: cn("text-foreground mb-2 flex items-center justify-between gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
34
+ className: cn("text-foreground mb-3 flex items-center justify-between gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
35
35
  ...props,
36
36
  children: [children, readOnly && /* @__PURE__ */ jsx(LockIcon, { className: "size-4" })]
37
37
  });
@@ -41,7 +41,6 @@ function Label$2({ className, readOnly, children, ...props }) {
41
41
  //#region src/components/Fields/Label/index.tsx
42
42
  const Label$1 = ({ label, readOnly }) => /* @__PURE__ */ jsx(Label$2, {
43
43
  readOnly,
44
- className: "rounded-md border border-dashed border-red-500 bg-red-500/10 p-3",
45
44
  children: label
46
45
  });
47
46
  var Label_default = Label$1;
@@ -87,36 +86,33 @@ const Checkbox$1 = ({ onChange, value, readOnly, field, label }) => {
87
86
  label,
88
87
  readOnly
89
88
  }), /* @__PURE__ */ jsx("div", {
90
- className: "rounded-md border border-dashed border-purple-500 bg-purple-500/10 p-3",
91
- children: /* @__PURE__ */ jsx("div", {
92
- className: layout === "horizontal" ? "flex w-fit flex-wrap gap-1.5" : "flex flex-col gap-3",
93
- children: field.options.map((option, index) => {
94
- const optionValue = option.value;
95
- const key = `${String(optionValue)}-${index}`;
96
- const isChecked = selectedValues.includes(optionValue);
97
- if (layout === "horizontal") return /* @__PURE__ */ jsx("label", {
98
- className: "flex-1",
99
- children: /* @__PURE__ */ jsx(Checkbox$2, {
100
- layout: "horizontal",
101
- checked: isChecked,
102
- onCheckedChange: (checked) => handleChange(optionValue, checked),
103
- disabled: readOnly,
104
- children: option.label || option.value?.toString()
105
- })
106
- }, key);
107
- return /* @__PURE__ */ jsxs("label", {
108
- className: "flex cursor-pointer items-center gap-3",
109
- children: [/* @__PURE__ */ jsx(Checkbox$2, {
110
- layout: "inline",
111
- checked: isChecked,
112
- onCheckedChange: (checked) => handleChange(optionValue, checked),
113
- disabled: readOnly
114
- }), /* @__PURE__ */ jsx("span", {
115
- className: "text-sm",
116
- children: option.label || option.value?.toString()
117
- })]
118
- }, key);
119
- })
89
+ className: layout === "horizontal" ? "flex w-fit flex-wrap gap-1.5" : "flex flex-col gap-3",
90
+ children: field.options.map((option, index) => {
91
+ const optionValue = option.value;
92
+ const key = `${String(optionValue)}-${index}`;
93
+ const isChecked = selectedValues.includes(optionValue);
94
+ if (layout === "horizontal") return /* @__PURE__ */ jsx("label", {
95
+ className: "flex-1",
96
+ children: /* @__PURE__ */ jsx(Checkbox$2, {
97
+ layout: "horizontal",
98
+ checked: isChecked,
99
+ onCheckedChange: (checked) => handleChange(optionValue, checked),
100
+ disabled: readOnly,
101
+ children: option.label || option.value?.toString()
102
+ })
103
+ }, key);
104
+ return /* @__PURE__ */ jsxs("label", {
105
+ className: "flex cursor-pointer items-center gap-3",
106
+ children: [/* @__PURE__ */ jsx(Checkbox$2, {
107
+ layout: "inline",
108
+ checked: isChecked,
109
+ onCheckedChange: (checked) => handleChange(optionValue, checked),
110
+ disabled: readOnly
111
+ }), /* @__PURE__ */ jsx("span", {
112
+ className: "text-sm",
113
+ children: option.label || option.value?.toString()
114
+ })]
115
+ }, key);
120
116
  })
121
117
  })] });
122
118
  };
@@ -138,14 +134,11 @@ function Input$2({ className, size = "default", ...props }) {
138
134
  const Input$1 = ({ onChange, label, field, readOnly }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Label_default, {
139
135
  label,
140
136
  readOnly: field.readOnly || readOnly
141
- }), /* @__PURE__ */ jsx("div", {
142
- className: "rounded-md border border-dashed border-cyan-500 bg-cyan-500/10 p-3",
143
- children: /* @__PURE__ */ jsx(Input$2, {
144
- type: "text",
145
- placeholder: field.placeholder,
146
- onChange: (e) => onChange(e.currentTarget.value),
147
- readOnly: field.readOnly || readOnly
148
- })
137
+ }), /* @__PURE__ */ jsx(Input$2, {
138
+ type: "text",
139
+ placeholder: field.placeholder,
140
+ onChange: (e) => onChange(e.currentTarget.value),
141
+ readOnly: field.readOnly || readOnly
149
142
  })] });
150
143
  var Input_default = Input$1;
151
144
 
@@ -462,41 +455,38 @@ const NumberUnit = ({ onChange, value, label, field, readOnly }) => {
462
455
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Label_default, {
463
456
  label,
464
457
  readOnly: field.readOnly || readOnly
465
- }), /* @__PURE__ */ jsx("div", {
466
- className: "rounded-md border border-dashed border-purple-500 bg-purple-500/10 p-3",
467
- children: /* @__PURE__ */ jsxs("div", {
468
- className: "flex",
469
- children: [/* @__PURE__ */ jsx("div", {
470
- className: "flex-1",
471
- children: /* @__PURE__ */ jsx(Input$2, {
472
- className: "rounded-r-none",
473
- type: "text",
474
- placeholder: field.placeholder || "Value",
475
- value: currentValue.value,
476
- onChange: (e) => handleInputChange(e.currentTarget.value),
477
- readOnly: field.readOnly || readOnly
478
- })
479
- }), /* @__PURE__ */ jsx("div", {
480
- className: "w-18",
481
- children: /* @__PURE__ */ jsxs(Select$2, {
482
- items: field.options || [],
483
- value: currentValue.unit,
484
- onValueChange: handleUnitChange,
485
- disabled: field.readOnly || readOnly,
486
- children: [/* @__PURE__ */ jsxs(SelectTrigger, {
487
- className: "rounded-l-none border-l-0",
488
- children: [/* @__PURE__ */ jsx(SelectValue, {}), /* @__PURE__ */ jsx(SelectIcon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-3.5" }) })]
489
- }), /* @__PURE__ */ jsx(SelectPopup, {
490
- align: "end",
491
- side: "bottom",
492
- children: /* @__PURE__ */ jsx(SelectList, { children: (field.options || []).map((option) => /* @__PURE__ */ jsxs(SelectItem, {
493
- value: option.value,
494
- children: [option.label, /* @__PURE__ */ jsx(SelectItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" }) })]
495
- }, option.value)) })
496
- })]
497
- })
498
- })]
499
- })
458
+ }), /* @__PURE__ */ jsxs("div", {
459
+ className: "flex",
460
+ children: [/* @__PURE__ */ jsx("div", {
461
+ className: "flex-1",
462
+ children: /* @__PURE__ */ jsx(Input$2, {
463
+ className: "rounded-r-none",
464
+ type: "text",
465
+ placeholder: field.placeholder || "Value",
466
+ value: currentValue.value,
467
+ onChange: (e) => handleInputChange(e.currentTarget.value),
468
+ readOnly: field.readOnly || readOnly
469
+ })
470
+ }), /* @__PURE__ */ jsx("div", {
471
+ className: "w-18",
472
+ children: /* @__PURE__ */ jsxs(Select$2, {
473
+ items: field.options || [],
474
+ value: currentValue.unit,
475
+ onValueChange: handleUnitChange,
476
+ disabled: field.readOnly || readOnly,
477
+ children: [/* @__PURE__ */ jsxs(SelectTrigger, {
478
+ className: "rounded-l-none border-l-0",
479
+ children: [/* @__PURE__ */ jsx(SelectValue, {}), /* @__PURE__ */ jsx(SelectIcon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-3.5" }) })]
480
+ }), /* @__PURE__ */ jsx(SelectPopup, {
481
+ align: "end",
482
+ side: "bottom",
483
+ children: /* @__PURE__ */ jsx(SelectList, { children: (field.options || []).map((option) => /* @__PURE__ */ jsxs(SelectItem, {
484
+ value: option.value,
485
+ children: [option.label, /* @__PURE__ */ jsx(SelectItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" }) })]
486
+ }, option.value)) })
487
+ })]
488
+ })
489
+ })]
500
490
  })] });
501
491
  };
502
492
  var NumberUnit_default = NumberUnit;
@@ -517,25 +507,22 @@ const Select$1 = ({ onChange, value, label, field, readOnly }) => {
517
507
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Label_default, {
518
508
  label,
519
509
  readOnly: field.readOnly || readOnly
520
- }), /* @__PURE__ */ jsx("div", {
521
- className: "rounded-md border border-dashed border-green-500 bg-green-500/10 p-3",
522
- children: /* @__PURE__ */ jsxs(Select$2, {
523
- items: itemsWithPlaceholder,
524
- value: value || null,
525
- onValueChange: handleValueChange,
526
- disabled: field.readOnly || readOnly,
527
- children: [/* @__PURE__ */ jsxs(SelectTrigger, {
528
- className: "min-w-46",
529
- children: [/* @__PURE__ */ jsx(SelectValue, {}), /* @__PURE__ */ jsx(SelectIcon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-3.5" }) })]
530
- }), /* @__PURE__ */ jsx(SelectPopup, {
531
- align: "center",
532
- side: "bottom",
533
- children: /* @__PURE__ */ jsx(SelectList, { children: field.options.map((option) => /* @__PURE__ */ jsxs(SelectItem, {
534
- value: option.value,
535
- children: [option.label, /* @__PURE__ */ jsx(SelectItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3" }) })]
536
- }, typeof option.label === "string" ? option.label : JSON.stringify(option.value))) })
537
- })]
538
- })
510
+ }), /* @__PURE__ */ jsxs(Select$2, {
511
+ items: itemsWithPlaceholder,
512
+ value: value || null,
513
+ onValueChange: handleValueChange,
514
+ disabled: field.readOnly || readOnly,
515
+ children: [/* @__PURE__ */ jsxs(SelectTrigger, {
516
+ className: "min-w-46",
517
+ children: [/* @__PURE__ */ jsx(SelectValue, {}), /* @__PURE__ */ jsx(SelectIcon, { children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-3.5" }) })]
518
+ }), /* @__PURE__ */ jsx(SelectPopup, {
519
+ align: "center",
520
+ side: "bottom",
521
+ children: /* @__PURE__ */ jsx(SelectList, { children: field.options.map((option) => /* @__PURE__ */ jsxs(SelectItem, {
522
+ value: option.value,
523
+ children: [option.label, /* @__PURE__ */ jsx(SelectItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3" }) })]
524
+ }, typeof option.label === "string" ? option.label : JSON.stringify(option.value))) })
525
+ })]
539
526
  })] });
540
527
  };
541
528
  var Select_default = Select$1;
@@ -579,38 +566,35 @@ const Radio$1 = ({ onChange, value, readOnly, field, label }) => {
579
566
  return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Label_default, {
580
567
  label,
581
568
  readOnly
582
- }), /* @__PURE__ */ jsx("div", {
583
- className: "rounded-md border border-dashed border-amber-500 bg-amber-500/10 p-3",
584
- children: /* @__PURE__ */ jsx(RadioGroup$1, {
585
- layout,
586
- value: value?.toString() || "",
587
- onValueChange: handleChange,
588
- disabled: readOnly,
589
- className: groupClassName,
590
- children: field.options.map((option, index) => {
591
- const optionValue = String(option.value ?? "");
592
- const key = `${optionValue}-${index}`;
593
- if (layout === "horizontal") return /* @__PURE__ */ jsx("label", {
594
- className: "flex-1",
595
- children: /* @__PURE__ */ jsx(RadioGroupItem, {
596
- layout: "horizontal",
597
- value: optionValue,
598
- disabled: readOnly,
599
- children: option.label || option.value?.toString()
600
- })
601
- }, key);
602
- return /* @__PURE__ */ jsxs("label", {
603
- className: "flex cursor-pointer items-center gap-3",
604
- children: [/* @__PURE__ */ jsx(RadioGroupItem, {
605
- layout: "inline",
606
- value: optionValue,
607
- disabled: readOnly
608
- }), /* @__PURE__ */ jsx("span", {
609
- className: "text-sm",
610
- children: option.label || option.value?.toString()
611
- })]
612
- }, key);
613
- })
569
+ }), /* @__PURE__ */ jsx(RadioGroup$1, {
570
+ layout,
571
+ value: value?.toString() || "",
572
+ onValueChange: handleChange,
573
+ disabled: readOnly,
574
+ className: groupClassName,
575
+ children: field.options.map((option, index) => {
576
+ const optionValue = String(option.value ?? "");
577
+ const key = `${optionValue}-${index}`;
578
+ if (layout === "horizontal") return /* @__PURE__ */ jsx("label", {
579
+ className: "flex-1",
580
+ children: /* @__PURE__ */ jsx(RadioGroupItem, {
581
+ layout: "horizontal",
582
+ value: optionValue,
583
+ disabled: readOnly,
584
+ children: option.label || option.value?.toString()
585
+ })
586
+ }, key);
587
+ return /* @__PURE__ */ jsxs("label", {
588
+ className: "flex cursor-pointer items-center gap-3",
589
+ children: [/* @__PURE__ */ jsx(RadioGroupItem, {
590
+ layout: "inline",
591
+ value: optionValue,
592
+ disabled: readOnly
593
+ }), /* @__PURE__ */ jsx("span", {
594
+ className: "text-sm",
595
+ children: option.label || option.value?.toString()
596
+ })]
597
+ }, key);
614
598
  })
615
599
  })] });
616
600
  };
@@ -631,13 +615,10 @@ function Textarea$1({ className, size = "default", ...props }) {
631
615
  const Textarea = ({ onChange, label, field, readOnly }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Label_default, {
632
616
  label,
633
617
  readOnly: field.readOnly || readOnly
634
- }), /* @__PURE__ */ jsx("div", {
635
- className: "rounded-md border border-dashed border-lime-500 bg-lime-500/10 p-3",
636
- children: /* @__PURE__ */ jsx(Textarea$1, {
637
- placeholder: field.placeholder,
638
- onChange: (e) => onChange(e.currentTarget.value),
639
- readOnly: field.readOnly || readOnly
640
- })
618
+ }), /* @__PURE__ */ jsx(Textarea$1, {
619
+ placeholder: field.placeholder,
620
+ onChange: (e) => onChange(e.currentTarget.value),
621
+ readOnly: field.readOnly || readOnly
641
622
  })] });
642
623
  var Textarea_default = Textarea;
643
624
 
@@ -1297,24 +1278,21 @@ const DrawerItem = ({ name, icon }) => {
1297
1278
  const description = componentConfig?.metadata?.description;
1298
1279
  const displayIcon = iconOrImage || /* @__PURE__ */ jsx(BoxIcon, { size: 16 });
1299
1280
  const hasTooltipContent = imageUrl || description;
1300
- const drawerContent = /* @__PURE__ */ jsx("div", {
1301
- className: "rounded-md border border-dashed border-red-500 bg-red-500/10 p-3",
1302
- children: /* @__PURE__ */ jsxs("div", {
1303
- className: "hover:bg-muted group flex cursor-grab items-center justify-between gap-2 rounded-md bg-white p-0.5 transition-colors",
1304
- children: [/* @__PURE__ */ jsxs("div", {
1305
- className: "flex items-center gap-2 truncate",
1306
- children: [/* @__PURE__ */ jsx("div", {
1307
- className: "border-border group-hover:border-muted rounded-sm border bg-white p-3",
1308
- children: displayIcon
1309
- }), /* @__PURE__ */ jsx("span", {
1310
- className: "truncate text-sm font-medium",
1311
- children: name
1312
- })]
1313
- }), /* @__PURE__ */ jsx("div", {
1314
- className: "text-foreground h-full flex-none rounded-sm bg-white px-1 py-3",
1315
- children: /* @__PURE__ */ jsx(GripVerticalIcon, { size: 16 })
1281
+ const drawerContent = /* @__PURE__ */ jsxs("div", {
1282
+ className: "hover:bg-muted group flex cursor-grab items-center justify-between gap-2 rounded-md bg-white p-0.5 transition-colors",
1283
+ children: [/* @__PURE__ */ jsxs("div", {
1284
+ className: "flex items-center gap-2 truncate",
1285
+ children: [/* @__PURE__ */ jsx("div", {
1286
+ className: "border-border group-hover:border-muted rounded-sm border bg-white p-3",
1287
+ children: displayIcon
1288
+ }), /* @__PURE__ */ jsx("span", {
1289
+ className: "truncate text-sm font-medium",
1290
+ children: name
1316
1291
  })]
1317
- })
1292
+ }), /* @__PURE__ */ jsx("div", {
1293
+ className: "text-foreground h-full flex-none rounded-sm bg-white px-1 py-3",
1294
+ children: /* @__PURE__ */ jsx(GripVerticalIcon, { size: 16 })
1295
+ })]
1318
1296
  });
1319
1297
  if (!hasTooltipContent) return drawerContent;
1320
1298
  return /* @__PURE__ */ jsx(TooltipProvider, {
@@ -1344,16 +1322,10 @@ var DrawerItem_default = DrawerItem;
1344
1322
  const createPuckOverridesPlugin = () => {
1345
1323
  return { overrides: {
1346
1324
  actionBar: ActionBar_default,
1347
- drawer: ({ children }) => /* @__PURE__ */ jsx("div", {
1348
- className: "rounded-md border border-dashed border-green-500 bg-green-500/10 p-3",
1349
- children
1350
- }),
1325
+ drawer: ({ children }) => /* @__PURE__ */ jsx(Fragment, { children }),
1351
1326
  drawerItem: DrawerItem_default,
1352
1327
  fields: FieldGroups_default,
1353
- fieldLabel: ({ children, label }) => /* @__PURE__ */ jsxs("div", {
1354
- className: "rounded-md border border-dashed border-blue-500 bg-blue-500/10 p-3",
1355
- children: [/* @__PURE__ */ jsx(Label_default, { label }), children]
1356
- }),
1328
+ fieldLabel: ({ children, label }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Label_default, { label }), children] }),
1357
1329
  fieldTypes: {
1358
1330
  checkbox: Checkbox_default,
1359
1331
  numberUnit: NumberUnit_default,
@@ -2265,35 +2237,32 @@ const useMediaPicker = (initialValue, onChange) => {
2265
2237
  };
2266
2238
  const MediaPicker = ({ value, onChange, mediaType }) => {
2267
2239
  const { currentValue, selectedType, handleTypeChange, handleUrlChange, handleMediaChange } = useMediaPicker(value, onChange);
2268
- return /* @__PURE__ */ jsx("div", {
2269
- className: "rounded-md border border-dashed border-yellow-500 bg-yellow-500/10 p-3",
2270
- children: /* @__PURE__ */ jsxs("div", {
2271
- className: "flex flex-col gap-y-3",
2272
- children: [
2273
- /* @__PURE__ */ jsx(RadioGroup$1, {
2274
- value: selectedType,
2275
- onValueChange: handleTypeChange,
2276
- className: "border-input flex w-fit flex-wrap divide-x divide-stone-200 overflow-hidden rounded-md border",
2277
- children: SOURCE_TYPE_OPTIONS.map((option) => /* @__PURE__ */ jsx("label", {
2278
- className: "flex-1",
2279
- children: /* @__PURE__ */ jsx(RadioGroupItem, {
2280
- layout: "horizontal",
2281
- value: option.value,
2282
- children: option.label
2283
- })
2284
- }, option.value))
2285
- }),
2286
- selectedType === "url" && /* @__PURE__ */ jsx(UrlField, {
2287
- value: currentValue.url || "",
2288
- onChange: handleUrlChange
2289
- }),
2290
- selectedType === "media" && /* @__PURE__ */ jsx(MediaLibraryField, {
2291
- value: currentValue.media || null,
2292
- onChange: handleMediaChange,
2293
- mediaType
2294
- })
2295
- ]
2296
- })
2240
+ return /* @__PURE__ */ jsxs("div", {
2241
+ className: "flex flex-col gap-y-3",
2242
+ children: [
2243
+ /* @__PURE__ */ jsx(RadioGroup$1, {
2244
+ value: selectedType,
2245
+ onValueChange: handleTypeChange,
2246
+ className: "border-input flex w-fit flex-wrap divide-x divide-stone-200 overflow-hidden rounded-md border",
2247
+ children: SOURCE_TYPE_OPTIONS.map((option) => /* @__PURE__ */ jsx("label", {
2248
+ className: "flex-1",
2249
+ children: /* @__PURE__ */ jsx(RadioGroupItem, {
2250
+ layout: "horizontal",
2251
+ value: option.value,
2252
+ children: option.label
2253
+ })
2254
+ }, option.value))
2255
+ }),
2256
+ selectedType === "url" && /* @__PURE__ */ jsx(UrlField, {
2257
+ value: currentValue.url || "",
2258
+ onChange: handleUrlChange
2259
+ }),
2260
+ selectedType === "media" && /* @__PURE__ */ jsx(MediaLibraryField, {
2261
+ value: currentValue.media || null,
2262
+ onChange: handleMediaChange,
2263
+ mediaType
2264
+ })
2265
+ ]
2297
2266
  });
2298
2267
  };
2299
2268
  const getMediaUrl = (value) => {
@@ -3401,12 +3370,9 @@ var ColorPicker_default = ColorPicker;
3401
3370
  const textColorField = { textColor: {
3402
3371
  type: "custom",
3403
3372
  label: "Text color",
3404
- render: ({ value, onChange, field }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Label_default, { label: field.label }), /* @__PURE__ */ jsx("div", {
3405
- className: "rounded-md border border-dashed border-lime-500 bg-lime-500/10 p-3",
3406
- children: /* @__PURE__ */ jsx(ColorPicker_default, {
3407
- value,
3408
- onChange
3409
- })
3373
+ render: ({ value, onChange, field }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Label_default, { label: field.label }), /* @__PURE__ */ jsx(ColorPicker_default, {
3374
+ value,
3375
+ onChange
3410
3376
  })] })
3411
3377
  } };
3412
3378
  function textColorToClasses(textColor) {