{"version":3,"file":"NestedWidget-C2CHSWPh.mjs","names":[],"sources":["../../widgets/src/ui/scroll-arrows.tsx","../../widgets/src/widgets/NestedWidget.tsx"],"sourcesContent":["import type React from \"react\";\nimport { ChevronLeft, ChevronRight } from \"lucide-react\";\n\ntype ScrollArrowsProps = {\n  onPrevious: () => void;\n  onNext: () => void;\n};\n\nexport function ScrollArrows({\n  onPrevious,\n  onNext,\n}: ScrollArrowsProps): React.JSX.Element {\n  return (\n    <>\n      <button\n        type=\"button\"\n        className=\"bg-foreground text-background flex size-6 items-center justify-center rounded-2xl opacity-70 transition-colors hover:opacity-50 disabled:opacity-30\"\n        onClick={onPrevious}\n        aria-label=\"Previous slide\"\n      >\n        <ChevronLeft className=\"size-4\" />\n      </button>\n      <button\n        type=\"button\"\n        className=\"bg-foreground text-background flex size-6 items-center justify-center rounded-2xl opacity-70 transition-colors hover:opacity-50 disabled:opacity-30\"\n        onClick={onNext}\n        aria-label=\"Next slide\"\n      >\n        <ChevronRight className=\"size-4\" />\n      </button>\n    </>\n  );\n}\n","import { useRef, type ComponentProps, type CSSProperties } from \"react\";\nimport type React from \"react\";\nimport {\n  MediaRenderer,\n  getMediaPropsFromShareable,\n} from \"../components/MediaRenderer\";\nimport type {\n  BorderRadiusOptions,\n  BorderWidthOptions,\n  ColorOptions,\n  FontSizeOptions,\n  PaddingOptions,\n  AlignOptions,\n  GapOptions,\n  BackgroundValue,\n} from \"@fluid-app/portal-core/types\";\nimport {\n  getHeightField,\n  type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport {\n  getBorderRadiusField,\n  getBorderWidthField,\n  getBorderColorField,\n  borderWidthClasses,\n  borderColorClasses,\n  getColorField,\n  getFontSizeField,\n  getGapField,\n  getPaddingField,\n  gapValues,\n} from \"../core/fields\";\nimport { ScrollArrows } from \"../ui/scroll-arrows\";\nimport { type ShareableItem } from \"@fluid-app/portal-core/types\";\nimport { useWidgetInteraction } from \"../contexts/WidgetInteractionContext\";\n\nconst DEFAULT_SHAREABLES: ShareableItem[] = [];\n\ntype NestedWidgetProps = ComponentProps<\"div\"> & {\n  // Content\n  resource?: ShareableItem;\n  titleEnabled?: boolean;\n  titleText?: string;\n  shareables?: ShareableItem[];\n\n  // Layout\n  gap?: GapOptions;\n  padding?: PaddingOptions;\n  borderRadius?: BorderRadiusOptions;\n  borderWidth?: BorderWidthOptions;\n  borderColor?: ColorOptions;\n  primaryMediaHeight?: string;\n\n  // Title styling\n  titleFontSize?: FontSizeOptions;\n  titleColor?: ColorOptions;\n  titleAlignment?: AlignOptions;\n\n  // Nested media styling\n  nestedTextColor?: ColorOptions;\n  background?: BackgroundValue;\n\n  // Overlay\n  overlayEnabled?: boolean;\n  overlayType?: \"solid\" | \"gradient\";\n  overlayIntensity?: number;\n};\n\nexport function NestedWidget({\n  resource,\n  titleEnabled = true,\n  titleText = \"Featured Collection\",\n  shareables = DEFAULT_SHAREABLES,\n  gap = \"md\",\n  padding = 4,\n  borderRadius = \"md\",\n  borderWidth = \"none\",\n  borderColor = \"muted\",\n  primaryMediaHeight = \"400px\",\n  titleFontSize = \"xl\",\n  titleColor = \"background\",\n  titleAlignment = { horizontal: \"left\", vertical: \"bottom\" },\n  nestedTextColor = \"foreground\",\n  background = {\n    type: \"solid\",\n    color: \"background\",\n  },\n  overlayEnabled = true,\n  overlayType = \"gradient\",\n  overlayIntensity = 50,\n  className,\n  ...props\n}: NestedWidgetProps): React.JSX.Element {\n  const scrollContainerRef = useRef<HTMLDivElement>(null);\n\n  const scrollByAmount = (direction: \"prev\" | \"next\") => {\n    const container = scrollContainerRef.current;\n    if (!container) return;\n\n    const computedGap = parseFloat(getComputedStyle(container).gap) || 0;\n    const firstItem = container.firstElementChild as HTMLElement | null;\n    const itemWidth = firstItem?.offsetWidth ?? 0;\n    const scrollAmount = itemWidth + computedGap;\n\n    container.scrollTo({\n      left:\n        container.scrollLeft +\n        (direction === \"next\" ? scrollAmount : -scrollAmount),\n      behavior: \"smooth\",\n    });\n  };\n\n  // Cap border radius for the primary media container: \"full\" creates a circle that clips\n  // the absolutely-positioned title overlay to the narrow bottom of the circle.\n  const primaryMediaRadius = borderRadius === \"full\" ? \"2xl\" : borderRadius;\n\n  const { onItemClick } = useWidgetInteraction();\n\n  const hasNestedMedia = shareables.length > 0;\n\n  const titleAlignmentClasses = {\n    left: \"text-left\",\n    center: \"text-center\",\n    right: \"text-right\",\n  };\n\n  const backgroundColor = background.color || \"background\";\n  const backgroundImage =\n    (background.resource?.image_url || background.resource?.imageUrl) &&\n    background.type === \"image\"\n      ? `url(${background.resource.image_url || background.resource.imageUrl})`\n      : \"none\";\n  const containerStyle = {\n    height: primaryMediaHeight,\n    backgroundImage: backgroundImage,\n    \"--nested-primary-media-size\": primaryMediaHeight,\n  } as CSSProperties;\n\n  return (\n    <div\n      className={`@container flex w-full flex-col overflow-hidden p-${padding} @xl:flex-row rounded-${borderRadius} ${borderWidthClasses[borderWidth]} ${borderWidth !== \"none\" ? borderColorClasses[borderColor] : \"\"} bg-${backgroundColor} ${className}`}\n      {...props}\n      style={containerStyle}\n    >\n      {/* Primary media stays full-width until the widget has room for a side-by-side carousel. */}\n      <div\n        className={`relative h-full w-full @xl:w-(--nested-primary-media-size) @xl:flex-none`}\n      >\n        {/* Media + overlay clipped to rounded shape — title is a sibling so it isn't clipped */}\n        <div\n          className={`overflow-hidden rounded-${primaryMediaRadius} absolute inset-0`}\n        >\n          <MediaRenderer\n            {...(resource ? getMediaPropsFromShareable(resource) : {})}\n            autoplay\n            loop\n            muted\n          />\n\n          {/* Overlay */}\n          {overlayEnabled && (\n            <div\n              className={`pointer-events-none absolute inset-0 z-10 ${\n                overlayType === \"gradient\"\n                  ? \"bg-gradient-to-t from-black to-transparent\"\n                  : \"bg-black\"\n              }`}\n              style={{\n                opacity:\n                  (Number(String(overlayIntensity).replace(\"%\", \"\")) || 50) /\n                  100,\n              }}\n            />\n          )}\n        </div>\n\n        {/* Title and Mobile Nested Media — outside the overflow-hidden clip */}\n        {((titleEnabled && titleText) || hasNestedMedia) && (\n          <div\n            className={`absolute z-20 w-full ${titleAlignmentClasses[titleAlignment?.horizontal ?? \"left\"]} p-${padding} ${\n              titleAlignment.vertical === \"top\"\n                ? `top-0 pt-${padding}`\n                : titleAlignment.vertical === \"center\"\n                  ? \"top-1/2 -translate-y-1/2\"\n                  : `bottom-0 pb-${padding}`\n            }`}\n          >\n            {titleEnabled && titleText && (\n              <h2\n                className={`font-header leading-tight font-bold text-${titleColor} text-${titleFontSize === \"md\" ? \"base\" : titleFontSize}`}\n              >\n                {titleText}\n              </h2>\n            )}\n\n            {/* Mobile: Products overlay inside primary media */}\n            {hasNestedMedia && (\n              <div className={`pt-${padding} @xl:hidden`}>\n                <div\n                  className={`flex overflow-x-auto gap-${gapValues[gap]} bg-transparent`}\n                >\n                  {shareables.map((shareable) => (\n                    <div\n                      key={shareable.id}\n                      className={`flex w-28 shrink-0 flex-col gap-1 @sm:w-32 ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n                      {...(onItemClick\n                        ? {\n                            role: \"button\",\n                            tabIndex: 0,\n                            onClick: () => onItemClick(shareable),\n                            onKeyDown: (e: React.KeyboardEvent) => {\n                              if (e.key === \"Enter\" || e.key === \" \") {\n                                e.preventDefault();\n                                onItemClick(shareable);\n                              }\n                            },\n                          }\n                        : {})}\n                    >\n                      <div\n                        className={`aspect-3/4 h-32 overflow-hidden rounded-${borderRadius} @sm:h-36`}\n                      >\n                        <MediaRenderer\n                          {...getMediaPropsFromShareable(shareable)}\n                        />\n                      </div>\n                      <div\n                        className={`min-w-0 text-xs leading-tight text-${titleColor}`}\n                      >\n                        <p className=\"truncate\">{shareable.title || \"\"}</p>\n                        <p className=\"truncate opacity-80\">\n                          {((shareable.display_price as string) ??\n                            shareable.price) ||\n                            \"\"}\n                        </p>\n                      </div>\n                    </div>\n                  ))}\n                </div>\n              </div>\n            )}\n          </div>\n        )}\n      </div>\n\n      {/* Wide containers: products sit in a single row beside the primary media. */}\n      {hasNestedMedia && (\n        <div\n          className={`relative hidden min-w-0 self-stretch px-${padding} @xl:flex @xl:flex-1`}\n        >\n          <div\n            ref={scrollContainerRef}\n            className={`flex h-full flex-row overflow-x-auto gap-${gapValues[gap]}`}\n            style={{ scrollSnapType: \"x mandatory\" }}\n          >\n            {shareables.map((shareable) => (\n              <div\n                key={shareable.id}\n                className={`flex shrink-0 flex-col gap-1 ${onItemClick ? \"cursor-pointer\" : \"\"}`}\n                style={{\n                  width: `calc(${primaryMediaHeight} * 0.75)`,\n                  scrollSnapAlign: \"start\",\n                }}\n                {...(onItemClick\n                  ? {\n                      role: \"button\",\n                      tabIndex: 0,\n                      onClick: () => onItemClick(shareable),\n                      onKeyDown: (e: React.KeyboardEvent) => {\n                        if (e.key === \"Enter\" || e.key === \" \") {\n                          e.preventDefault();\n                          onItemClick(shareable);\n                        }\n                      },\n                    }\n                  : {})}\n              >\n                <div\n                  className={`aspect-3/4 h-full rounded-${borderRadius} overflow-hidden`}\n                >\n                  <MediaRenderer {...getMediaPropsFromShareable(shareable)} />\n                </div>\n                <div className={`flex-none text-sm text-${nestedTextColor}`}>\n                  <p className=\"truncate\">{shareable.title || \"\"}</p>\n                  <p className=\"truncate\">\n                    {((shareable.display_price as string) ?? shareable.price) ||\n                      \"\"}\n                  </p>\n                </div>\n              </div>\n            ))}\n          </div>\n\n          {/* Navigation arrows */}\n          <div\n            className={`absolute inset-x-0 top-1/2 flex w-full -translate-y-1/2 items-center justify-between px-8`}\n          >\n            <ScrollArrows\n              onPrevious={() => scrollByAmount(\"prev\")}\n              onNext={() => scrollByAmount(\"next\")}\n            />\n          </div>\n        </div>\n      )}\n    </div>\n  );\n}\n\nexport const nestedWidgetPropertySchema: WidgetPropertySchema = {\n  widgetType: \"NestedWidget\",\n  displayName: \"Nested Widget\",\n  tabsConfig: [\n    { id: \"styling\", label: \"Styling\" },\n    { id: \"data\", label: \"Data\" },\n  ],\n  dataSourceTargetProps: [\"shareables\"],\n  fields: [\n    // Content tab - Resource group\n    {\n      key: \"resource\",\n      label: \"Primary Media\",\n      type: \"image\",\n      accept: \"any\",\n      description: \"Select the primary media displayed in the large panel\",\n      tab: \"styling\",\n      group: \"Content\",\n    },\n    // Content tab - Title group\n    {\n      key: \"titleEnabled\",\n      label: \"Widget Title\",\n      type: \"boolean\",\n      description: \"Enable the title displayed over the primary media\",\n      defaultValue: true,\n      tab: \"styling\",\n      group: \"Title\",\n    },\n    {\n      key: \"titleText\",\n      label: \"Title\",\n      type: \"text\",\n      description: \"Main title displayed over the primary media\",\n      defaultValue: \"Featured Collection\",\n      tab: \"styling\",\n      group: \"Title\",\n      requiresKeyToBeTrue: \"titleEnabled\",\n    },\n    getFontSizeField({\n      label: \"Title Font Size\",\n      defaultValue: \"xl\",\n      key: \"titleFontSize\",\n      description: \"Font size for the widget title\",\n      tab: \"styling\",\n      group: \"Title\",\n      requiresKeyToBeTrue: \"titleEnabled\",\n    }),\n    getColorField({\n      defaultValue: \"background\",\n      key: \"titleColor\",\n      label: \"Title Color\",\n      description: \"Color for the widget title\",\n      tab: \"styling\",\n      group: \"Title\",\n      requiresKeyToBeTrue: \"titleEnabled\",\n    }),\n    // Styling tab - Design group\n    getHeightField({\n      key: \"primaryMediaHeight\",\n      label: \"Primary Media Height\",\n      description: \"Height of the primary media container\",\n      defaultValue: \"400px\",\n      tab: \"styling\",\n      group: \"Design\",\n    }),\n    {\n      key: \"separator\",\n      type: \"separator\",\n      label: \"Separator\",\n      tab: \"styling\",\n      group: \"Design\",\n    },\n    {\n      key: \"titleAlignment\",\n      label: \"Content Alignment\",\n      type: \"alignment\",\n      description: \"Alignment of the content inside the primary media\",\n      defaultValue: { horizontal: \"left\", vertical: \"bottom\" },\n      options: {\n        horizontalEnabled: true,\n        verticalEnabled: true,\n      },\n      tab: \"styling\",\n      group: \"Design\",\n    },\n    {\n      key: \"separator2\",\n      type: \"separator\",\n      label: \"Separator\",\n      tab: \"styling\",\n      group: \"Design\",\n    },\n    getPaddingField({\n      defaultValue: 4,\n      key: \"padding\",\n      label: \"Padding\",\n      description: \"Padding used throughout the widget\",\n      tab: \"styling\",\n      group: \"Design\",\n    }),\n    getBorderRadiusField({\n      defaultValue: \"md\",\n      label: \"Border Radius\",\n      key: \"borderRadius\",\n      description: \"Rounded corners for the widget\",\n      tab: \"styling\",\n      group: \"Design\",\n    }),\n    getBorderWidthField({\n      key: \"borderWidth\",\n      label: \"Border Width\",\n      description: \"Border width for the widget\",\n      defaultValue: \"none\",\n      tab: \"styling\",\n      group: \"Design\",\n    }),\n    getBorderColorField({\n      key: \"borderColor\",\n      label: \"Border Color\",\n      description: \"Border color for the widget\",\n      defaultValue: \"muted\",\n      tab: \"styling\",\n      group: \"Design\",\n    }),\n    {\n      key: \"overlayEnabled\",\n      label: \"Enable Overlay\",\n      type: \"boolean\",\n      description:\n        \"Add a dark overlay to the primary media for better text readability\",\n      defaultValue: true,\n      tab: \"styling\",\n      group: \"Design\",\n    },\n    {\n      key: \"overlayType\",\n      label: \"Overlay Type\",\n      type: \"buttonGroup\",\n      description: \"Type of overlay effect\",\n      defaultValue: \"gradient\",\n      options: [\n        { label: \"Solid\", value: \"solid\" },\n        { label: \"Gradient\", value: \"gradient\" },\n      ],\n      tab: \"styling\",\n      group: \"Design\",\n      requiresKeyToBeTrue: \"overlayEnabled\",\n    },\n    {\n      key: \"overlayIntensity\",\n      label: \"Overlay Intensity\",\n      type: \"slider\",\n      description: \"Opacity of the overlay (0-100)\",\n      min: 0,\n      max: 100,\n      step: 5,\n      defaultValue: 50,\n      unit: \"%\",\n      tab: \"styling\",\n      group: \"Design\",\n      requiresKeyToBeTrue: \"overlayEnabled\",\n    },\n    // Styling tab - Nested Media Styling group\n    getGapField({\n      label: \"Gap\",\n      defaultValue: \"md\",\n      key: \"gap\",\n      description: \"Gap between nested media items\",\n      tab: \"styling\",\n      group: \"Nested Design\",\n    }),\n    getColorField({\n      defaultValue: \"foreground\",\n      key: \"nestedTextColor\",\n      label: \"Nested Text Color\",\n      description: \"Color for nested media labels\",\n      tab: \"styling\",\n      group: \"Nested Design\",\n    }),\n    {\n      type: \"background\",\n      defaultValue: { type: \"solid\", color: \"background\" },\n      key: \"background\",\n      label: \"Background\",\n      description: \"Background color for nested media container\",\n      tab: \"styling\",\n      group: \"Nested Design\",\n    },\n    // Data tab\n    {\n      key: \"dataSource\",\n      label: \"Data Source\",\n      type: \"dataSource\",\n      description: \"Configure the shareable records rendered by this widget.\",\n      targetProps: [\n        {\n          key: \"shareables\",\n          description:\n            \"Shareable records rendered in the nested content region.\",\n        },\n      ],\n      tab: \"data\",\n      group: \"Data Configuration\",\n    },\n  ],\n  // Per-item configuration schema for custom data sources\n  itemConfigSchema: {\n    description: \"Configure settings for this item\",\n    fields: [\n      {\n        key: \"title\",\n        label: \"Custom Title\",\n        type: \"text\",\n        description: \"Override the item's title for this widget\",\n      },\n    ],\n  },\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;AAQA,SAAgB,aAAa,EAC3B,YACA,UACuC;AACvC,QACE,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,UAAD;EACE,MAAK;EACL,WAAU;EACV,SAAS;EACT,cAAW;YAEX,oBAAC,aAAD,EAAa,WAAU,UAAW,CAAA;EAC3B,CAAA,EACT,oBAAC,UAAD;EACE,MAAK;EACL,WAAU;EACV,SAAS;EACT,cAAW;YAEX,oBAAC,cAAD,EAAc,WAAU,UAAW,CAAA;EAC5B,CAAA,CACR,EAAA,CAAA;;;;;;;;ACMP,MAAM,qBAAsC,EAAE;AAgC9C,SAAgB,aAAa,EAC3B,UACA,eAAe,MACf,YAAY,uBACZ,aAAa,oBACb,MAAM,MACN,UAAU,GACV,eAAe,MACf,cAAc,QACd,cAAc,SACd,qBAAqB,SACrB,gBAAgB,MAChB,aAAa,cACb,iBAAiB;CAAE,YAAY;CAAQ,UAAU;CAAU,EAC3D,kBAAkB,cAClB,aAAa;CACX,MAAM;CACN,OAAO;CACR,EACD,iBAAiB,MACjB,cAAc,YACd,mBAAmB,IACnB,WAC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;GACd,KAAK;GACL,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACF,cAAc;GACZ,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAEF,eAAe;GACb,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;IAAE,YAAY;IAAQ,UAAU;IAAU;GACxD,SAAS;IACP,mBAAmB;IACnB,iBAAiB;IAClB;GACD,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,MAAM;GACN,OAAO;GACP,KAAK;GACL,OAAO;GACR;EACD,gBAAgB;GACd,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACF,qBAAqB;GACnB,cAAc;GACd,OAAO;GACP,KAAK;GACL,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aACE;GACF,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,SAAS,CACP;IAAE,OAAO;IAAS,OAAO;IAAS,EAClC;IAAE,OAAO;IAAY,OAAO;IAAY,CACzC;GACD,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,KAAK;GACL,KAAK;GACL,MAAM;GACN,cAAc;GACd,MAAM;GACN,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EAED,YAAY;GACV,OAAO;GACP,cAAc;GACd,KAAK;GACL,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACF,cAAc;GACZ,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,MAAM;GACN,cAAc;IAAE,MAAM;IAAS,OAAO;IAAc;GACpD,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR;EAED;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,aAAa,CACX;IACE,KAAK;IACL,aACE;IACH,CACF;GACD,KAAK;GACL,OAAO;GACR;EACF;CAED,kBAAkB;EAChB,aAAa;EACb,QAAQ,CACN;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACd,CACF;EACF;CACF"}