{"version":3,"file":"SpacerWidget-cakbEm5A.mjs","names":[],"sources":["../../widgets/src/widgets/SpacerWidget.tsx"],"sourcesContent":["import { type WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport { ArrowUpDown } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\n\ntype SpacerWidgetProps = ComponentProps<\"div\"> & {\n  /**\n   * Custom height as a CSS value (e.g., \"128px\", \"8rem\", \"20vh\")\n   */\n  customHeight?: string;\n  /**\n   * Not customizable, determines if we should show a preview image in the container\n   */\n  previewMode?: boolean;\n};\n\nexport function SpacerWidget({\n  customHeight = \"128px\",\n  previewMode = false,\n  className,\n  style,\n  ...props\n}: SpacerWidgetProps): React.JSX.Element {\n  return (\n    <div\n      className={`w-full ${className ?? \"\"}`}\n      style={{ height: customHeight, ...style }}\n      aria-hidden=\"true\"\n      {...props}\n    >\n      {previewMode && (\n        <div className=\"border-muted/40 bg-muted text-muted-foreground flex h-full w-full items-center justify-center gap-1 border border-dashed\">\n          <ArrowUpDown />\n          <span>SPACER</span>\n        </div>\n      )}\n    </div>\n  );\n}\n\nexport const spacerWidgetPropertySchema: WidgetPropertySchema = {\n  widgetType: \"SpacerWidget\",\n  displayName: \"Spacer\",\n  fields: [\n    {\n      key: \"customHeight\",\n      label: \"Height\",\n      type: \"cssUnit\",\n      description: \"Height of the spacer\",\n      defaultValue: \"128px\",\n      allowedUnits: [\"px\", \"vh\", \"rem\"],\n      minByUnit: { px: 1, vh: 1, rem: 0.25 },\n      maxByUnit: { px: 2000, vh: 100, rem: 125 },\n      stepByUnit: { px: 1, vh: 1, rem: 0.25 },\n      group: \"Spacing\",\n    },\n  ],\n};\n"],"mappings":";;;;;;;;AAgBA,SAAgB,aAAa,EAC3B,eAAe,SACf,cAAc,OACd,WACA,OACA,GAAG,SACoC;AACvC,QACE,oBAAC,OAAD;EACE,WAAW,UAAU,aAAa;EAClC,OAAO;GAAE,QAAQ;GAAc,GAAG;GAAO;EACzC,eAAY;EACZ,GAAI;YAEH,eACC,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,oBAAC,aAAD,EAAe,CAAA,EACf,oBAAC,QAAD,EAAA,UAAM,UAAa,CAAA,CACf;;EAEJ,CAAA;;AAIV,MAAa,6BAAmD;CAC9D,YAAY;CACZ,aAAa;CACb,QAAQ,CACN;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,aAAa;EACb,cAAc;EACd,cAAc;GAAC;GAAM;GAAM;GAAM;EACjC,WAAW;GAAE,IAAI;GAAG,IAAI;GAAG,KAAK;GAAM;EACtC,WAAW;GAAE,IAAI;GAAM,IAAI;GAAK,KAAK;GAAK;EAC1C,YAAY;GAAE,IAAI;GAAG,IAAI;GAAG,KAAK;GAAM;EACvC,OAAO;EACR,CACF;CACF"}