@fluid-app/portal-sdk 0.1.492 → 0.1.494
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/{AnnouncementWidget-CNP37JUB.cjs → AnnouncementWidget--nRHRrQH.cjs} +3 -3
- package/dist/{AnnouncementWidget-93a322Pl.mjs → AnnouncementWidget-BND76Ojg.mjs} +2 -2
- package/dist/{AnnouncementWidget-93a322Pl.mjs.map → AnnouncementWidget-BND76Ojg.mjs.map} +1 -1
- package/dist/{AnnouncementWidget-BIFJ7E6o.cjs → AnnouncementWidget-Dh6nKAqT.cjs} +2 -2
- package/dist/{AnnouncementWidget-BIFJ7E6o.cjs.map → AnnouncementWidget-Dh6nKAqT.cjs.map} +1 -1
- package/dist/{CarouselWidget-fft3Aibh.cjs → CarouselWidget-BETNqs_K.cjs} +3 -3
- package/dist/{CarouselWidget-fft3Aibh.cjs.map → CarouselWidget-BETNqs_K.cjs.map} +1 -1
- package/dist/{CarouselWidget-COavwXvx.mjs → CarouselWidget-CU1oj0q4.mjs} +3 -3
- package/dist/{CarouselWidget-COavwXvx.mjs.map → CarouselWidget-CU1oj0q4.mjs.map} +1 -1
- package/dist/{CarouselWidget-DDKKVEan.cjs → CarouselWidget-D3BODbpO.cjs} +3 -3
- package/dist/{CatchUpWidget-C3HdLA5t.mjs → CatchUpWidget-BtwG2-JD.mjs} +2 -2
- package/dist/{CatchUpWidget-BNEEQNcr.mjs → CatchUpWidget-CLwHp30X.mjs} +5 -4
- package/dist/CatchUpWidget-CLwHp30X.mjs.map +1 -0
- package/dist/{CatchUpWidget-G4txAfv3.cjs → CatchUpWidget-CqAHpCJP.cjs} +5 -4
- package/dist/CatchUpWidget-CqAHpCJP.cjs.map +1 -0
- package/dist/{CatchUpWidget-g9GtsvCy.cjs → CatchUpWidget-ak-oFdKY.cjs} +2 -2
- package/dist/{FluidProvider-DxwbLpfX.mjs → FluidProvider-BRgNyDk3.mjs} +3 -3
- package/dist/{FluidProvider-DxwbLpfX.mjs.map → FluidProvider-BRgNyDk3.mjs.map} +1 -1
- package/dist/{FluidProvider-B7bYw1AY.cjs → FluidProvider-XONLsJbE.cjs} +3 -3
- package/dist/{FluidProvider-B7bYw1AY.cjs.map → FluidProvider-XONLsJbE.cjs.map} +1 -1
- package/dist/{ImageWidget-B3IlWnKJ.cjs → ImageWidget-CksrA9rH.cjs} +2 -2
- package/dist/{ImageWidget-B3IlWnKJ.cjs.map → ImageWidget-CksrA9rH.cjs.map} +1 -1
- package/dist/{ImageWidget-DiWlWvKm.cjs → ImageWidget-DmO84AYo.cjs} +3 -3
- package/dist/{ImageWidget-CovwH8bp.mjs → ImageWidget-I8F34YlI.mjs} +2 -2
- package/dist/{ImageWidget-CovwH8bp.mjs.map → ImageWidget-I8F34YlI.mjs.map} +1 -1
- package/dist/{LinkWidget-StpP6gPq.mjs → LinkWidget-Dg0tHfgD.mjs} +2 -2
- package/dist/{LinkWidget-StpP6gPq.mjs.map → LinkWidget-Dg0tHfgD.mjs.map} +1 -1
- package/dist/{LinkWidget-BTIsGyc5.cjs → LinkWidget-Dvp6-Dow.cjs} +2 -2
- package/dist/{LinkWidget-BTIsGyc5.cjs.map → LinkWidget-Dvp6-Dow.cjs.map} +1 -1
- package/dist/{LinkWidget-ZVFlL178.cjs → LinkWidget-N6yz6w-U.cjs} +3 -3
- package/dist/{ListWidget-ddhJLwxZ.mjs → ListWidget-BAS3SGpD.mjs} +3 -3
- package/dist/{ListWidget-ddhJLwxZ.mjs.map → ListWidget-BAS3SGpD.mjs.map} +1 -1
- package/dist/{ListWidget-6TkLyp00.cjs → ListWidget-CH-zz3sb.cjs} +3 -3
- package/dist/{ListWidget-6TkLyp00.cjs.map → ListWidget-CH-zz3sb.cjs.map} +1 -1
- package/dist/{ListWidget-BNAED5xZ.cjs → ListWidget-vG31UVVS.cjs} +3 -3
- package/dist/{MessagingScreen-CZje-9-C.mjs → MessagingScreen-B8--eInM.mjs} +19 -19
- package/dist/{MessagingScreen-DDVflwCT.cjs → MessagingScreen-D2oC8zGg.cjs} +19 -19
- package/dist/{MessagingScreen-Q0BSmRuJ.mjs → MessagingScreen-DYjU5smt.mjs} +2 -2
- package/dist/{MessagingScreen-Q0BSmRuJ.mjs.map → MessagingScreen-DYjU5smt.mjs.map} +1 -1
- package/dist/{MessagingScreen-D7Yuy_Rn.cjs → MessagingScreen-gPqbIcFd.cjs} +2 -2
- package/dist/{MessagingScreen-D7Yuy_Rn.cjs.map → MessagingScreen-gPqbIcFd.cjs.map} +1 -1
- package/dist/{NestedWidget-orTqukJD.cjs → NestedWidget-B24yMkV4.cjs} +2 -2
- package/dist/{NestedWidget-orTqukJD.cjs.map → NestedWidget-B24yMkV4.cjs.map} +1 -1
- package/dist/{NestedWidget-DMhmCZT6.mjs → NestedWidget-D31rZhTR.mjs} +2 -2
- package/dist/{NestedWidget-DMhmCZT6.mjs.map → NestedWidget-D31rZhTR.mjs.map} +1 -1
- package/dist/{NestedWidget-BZZqukZw.cjs → NestedWidget-DqM5HGFl.cjs} +2 -2
- package/dist/{OrdersScreen-vAO6E8EM.cjs → OrdersScreen-BdLqCq1V.cjs} +19 -19
- package/dist/{OrdersScreen-CXxGN6RY.mjs → OrdersScreen-CHSqar4N.mjs} +3 -3
- package/dist/{OrdersScreen-CXxGN6RY.mjs.map → OrdersScreen-CHSqar4N.mjs.map} +1 -1
- package/dist/{OrdersScreen-DOBWnf_w.mjs → OrdersScreen-DRcdhc7y.mjs} +19 -19
- package/dist/{OrdersScreen-C0TzmZCl.cjs → OrdersScreen-Xs90dlpC.cjs} +3 -3
- package/dist/{OrdersScreen-C0TzmZCl.cjs.map → OrdersScreen-Xs90dlpC.cjs.map} +1 -1
- package/dist/{ProfileScreen-B9NHS4A_.cjs → ProfileScreen-BeaM28Qw.cjs} +20 -20
- package/dist/{ProfileScreen-DWFXnUUU.mjs → ProfileScreen-C-YfTr7l.mjs} +20 -20
- package/dist/{ProfileScreen-BGLpyuef.mjs → ProfileScreen-CpoLji_m.mjs} +3 -3
- package/dist/{ProfileScreen-BGLpyuef.mjs.map → ProfileScreen-CpoLji_m.mjs.map} +1 -1
- package/dist/{ProfileScreen-tq1DJ71b.cjs → ProfileScreen-DdCPrQUL.cjs} +3 -3
- package/dist/{ProfileScreen-tq1DJ71b.cjs.map → ProfileScreen-DdCPrQUL.cjs.map} +1 -1
- package/dist/{QuickLinksWidget-DIkDVuvE.mjs → QuickLinksWidget-BiEUvm_J.mjs} +2 -2
- package/dist/{QuickLinksWidget-DIkDVuvE.mjs.map → QuickLinksWidget-BiEUvm_J.mjs.map} +1 -1
- package/dist/{QuickLinksWidget-DDFtIKqs.cjs → QuickLinksWidget-CLBvaogv.cjs} +2 -2
- package/dist/{QuickLinksWidget-DDFtIKqs.cjs.map → QuickLinksWidget-CLBvaogv.cjs.map} +1 -1
- package/dist/{QuickLinksWidget-HvMQHOkz.cjs → QuickLinksWidget-DzAL_wuz.cjs} +3 -3
- package/dist/{QuickShareWidget-BNf1Un61.cjs → QuickShareWidget-B7mlqgW8.cjs} +2 -2
- package/dist/{QuickShareWidget-lysi8Dhh.mjs → QuickShareWidget-Dzpzis1d.mjs} +2 -2
- package/dist/{QuickShareWidget-lysi8Dhh.mjs.map → QuickShareWidget-Dzpzis1d.mjs.map} +1 -1
- package/dist/{QuickShareWidget-mxiy1zdd.cjs → QuickShareWidget-wxRcBUkf.cjs} +2 -2
- package/dist/{QuickShareWidget-mxiy1zdd.cjs.map → QuickShareWidget-wxRcBUkf.cjs.map} +1 -1
- package/dist/{RecentActivityWidget-DGtKC_9F.mjs → RecentActivityWidget-BzmV4G8e.mjs} +2 -2
- package/dist/{RecentActivityWidget-DGtKC_9F.mjs.map → RecentActivityWidget-BzmV4G8e.mjs.map} +1 -1
- package/dist/{RecentActivityWidget-DcgOzvHx.cjs → RecentActivityWidget-DQcy41-I.cjs} +2 -2
- package/dist/{RecentActivityWidget-Cr1G82Cd.cjs → RecentActivityWidget-zBOY0c_B.cjs} +2 -2
- package/dist/{RecentActivityWidget-Cr1G82Cd.cjs.map → RecentActivityWidget-zBOY0c_B.cjs.map} +1 -1
- package/dist/{ShopWidget-C5hjVwsY.cjs → ShopWidget-CCITGTSs.cjs} +2 -2
- package/dist/{ShopWidget-C5hjVwsY.cjs.map → ShopWidget-CCITGTSs.cjs.map} +1 -1
- package/dist/{ShopWidget-BYQKWyri.mjs → ShopWidget-D98tmUgG.mjs} +2 -2
- package/dist/{ShopWidget-B80w-Drk.mjs → ShopWidget-DHM86LM3.mjs} +2 -2
- package/dist/{ShopWidget-B80w-Drk.mjs.map → ShopWidget-DHM86LM3.mjs.map} +1 -1
- package/dist/{ShopWidget-CoOK6Ctd.cjs → ShopWidget-DXVsF1Jh.cjs} +2 -2
- package/dist/{SubscriptionsScreen-BwcpTAn5.mjs → SubscriptionsScreen-BOM_1txu.mjs} +20 -20
- package/dist/{SubscriptionsScreen-BEzmLp01.cjs → SubscriptionsScreen-DGIEnvLM.cjs} +20 -20
- package/dist/{SubscriptionsScreen-Cy7RtO5K.cjs → SubscriptionsScreen-DzBPA9H8.cjs} +4 -4
- package/dist/{SubscriptionsScreen-Cy7RtO5K.cjs.map → SubscriptionsScreen-DzBPA9H8.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-C7OOGlBt.mjs → SubscriptionsScreen-cAKZwpIu.mjs} +4 -4
- package/dist/{SubscriptionsScreen-C7OOGlBt.mjs.map → SubscriptionsScreen-cAKZwpIu.mjs.map} +1 -1
- package/dist/{TableWidget-lXrvBX6U.cjs → TableWidget-B8F_uQ92.cjs} +2 -2
- package/dist/{TableWidget-Bxwn3QYs.mjs → TableWidget-CDGdl71J.mjs} +2 -2
- package/dist/{TableWidget-Bxwn3QYs.mjs.map → TableWidget-CDGdl71J.mjs.map} +1 -1
- package/dist/{TableWidget-uoeYCPzf.cjs → TableWidget-DNjUA2Il.cjs} +2 -2
- package/dist/{TableWidget-uoeYCPzf.cjs.map → TableWidget-DNjUA2Il.cjs.map} +1 -1
- package/dist/{VideoWidget-D8FAjnvj.cjs → VideoWidget-UQQoRmwC.cjs} +3 -3
- package/dist/{VideoWidget-DQzYOcFF.mjs → VideoWidget-Wca2-So_.mjs} +2 -2
- package/dist/{VideoWidget-DQzYOcFF.mjs.map → VideoWidget-Wca2-So_.mjs.map} +1 -1
- package/dist/{VideoWidget-BhN4oTGG.cjs → VideoWidget-bf-gkCfx.cjs} +2 -2
- package/dist/{VideoWidget-BhN4oTGG.cjs.map → VideoWidget-bf-gkCfx.cjs.map} +1 -1
- package/dist/{WidgetInteractionContext-Bjy4P_YP.cjs → WidgetInteractionContext-D9dBJ-39.cjs} +5 -3
- package/dist/WidgetInteractionContext-D9dBJ-39.cjs.map +1 -0
- package/dist/{WidgetInteractionContext-Ba_G5sDP.mjs → WidgetInteractionContext-IsMo73Ka.mjs} +5 -3
- package/dist/WidgetInteractionContext-IsMo73Ka.mjs.map +1 -0
- package/dist/{build-widget-registry-DAOb4Muk.mjs → build-widget-registry-70KBtqiR.mjs} +27 -27
- package/dist/{build-widget-registry-DAOb4Muk.mjs.map → build-widget-registry-70KBtqiR.mjs.map} +1 -1
- package/dist/{build-widget-registry-BZeMOKCj.cjs → build-widget-registry-CWQ0YvEy.cjs} +27 -27
- package/dist/{build-widget-registry-BZeMOKCj.cjs.map → build-widget-registry-CWQ0YvEy.cjs.map} +1 -1
- package/dist/index.cjs +55 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +55 -34
- package/dist/index.mjs.map +1 -1
- package/dist/styles/remote-widget-shadow.css +2 -2
- package/dist/{use-internal-link-WJcYzKsi.mjs → use-internal-link-CKMpGvvs.mjs} +2 -2
- package/dist/{use-internal-link-WJcYzKsi.mjs.map → use-internal-link-CKMpGvvs.mjs.map} +1 -1
- package/dist/{use-internal-link-BTIkbJYg.cjs → use-internal-link-IcDHjPGp.cjs} +2 -2
- package/dist/{use-internal-link-BTIkbJYg.cjs.map → use-internal-link-IcDHjPGp.cjs.map} +1 -1
- package/dist/{use-link-action-C32zrsI0.mjs → use-link-action-CtVnC_2G.mjs} +2 -2
- package/dist/{use-link-action-C32zrsI0.mjs.map → use-link-action-CtVnC_2G.mjs.map} +1 -1
- package/dist/{use-link-action-rBy0j6go.cjs → use-link-action-DzA9AQsE.cjs} +2 -2
- package/dist/{use-link-action-rBy0j6go.cjs.map → use-link-action-DzA9AQsE.cjs.map} +1 -1
- package/dist/{use-portal-card-add-3ds-flow-DhfOxgMV.mjs → use-portal-card-add-3ds-flow-BMHRmeuB.mjs} +3 -3
- package/dist/{use-portal-card-add-3ds-flow-DhfOxgMV.mjs.map → use-portal-card-add-3ds-flow-BMHRmeuB.mjs.map} +1 -1
- package/dist/{use-portal-card-add-3ds-flow-DUBFzvAB.cjs → use-portal-card-add-3ds-flow-BsSH1Xks.cjs} +3 -3
- package/dist/{use-portal-card-add-3ds-flow-DUBFzvAB.cjs.map → use-portal-card-add-3ds-flow-BsSH1Xks.cjs.map} +1 -1
- package/dist/utils/build-remote-widget-plugin-manifests.cjs +17 -17
- package/dist/utils/build-remote-widget-plugin-manifests.mjs +17 -17
- package/dist/utils/build-widget-registry.cjs +17 -17
- package/dist/utils/build-widget-registry.mjs +17 -17
- package/package.json +19 -19
- package/dist/CatchUpWidget-BNEEQNcr.mjs.map +0 -1
- package/dist/CatchUpWidget-G4txAfv3.cjs.map +0 -1
- package/dist/WidgetInteractionContext-Ba_G5sDP.mjs.map +0 -1
- package/dist/WidgetInteractionContext-Bjy4P_YP.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-9hOWP6kD.cjs");
|
|
2
|
-
const require_WidgetInteractionContext = require("./WidgetInteractionContext-
|
|
2
|
+
const require_WidgetInteractionContext = require("./WidgetInteractionContext-D9dBJ-39.cjs");
|
|
3
3
|
const require_registries = require("./registries-MpWTUak_.cjs");
|
|
4
4
|
const require_MediaRenderer = require("./MediaRenderer-m_d4GHu0.cjs");
|
|
5
5
|
let react = require("react");
|
|
@@ -392,4 +392,4 @@ Object.defineProperty(exports, "nestedWidgetPropertySchema", {
|
|
|
392
392
|
}
|
|
393
393
|
});
|
|
394
394
|
|
|
395
|
-
//# sourceMappingURL=NestedWidget-
|
|
395
|
+
//# sourceMappingURL=NestedWidget-B24yMkV4.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestedWidget-orTqukJD.cjs","names":["ChevronLeft","ChevronRight","useWidgetInteraction","borderWidthClasses","borderColorClasses","MediaRenderer","getMediaPropsFromShareable","gapValues","getFontSizeField","getColorField","getHeightField","getPaddingField","getBorderRadiusField","getBorderWidthField","getBorderColorField","getGapField"],"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,iBAAA,GAAA,kBAAA,MAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAC,UAAD;EACE,MAAK;EACL,WAAU;EACV,SAAS;EACT,cAAW;YAEX,iBAAA,GAAA,kBAAA,KAACA,aAAAA,aAAD,EAAa,WAAU,UAAW,CAAA;EAC3B,CAAA,EACT,iBAAA,GAAA,kBAAA,KAAC,UAAD;EACE,MAAK;EACL,WAAU;EACV,SAAS;EACT,cAAW;YAEX,iBAAA,GAAA,kBAAA,KAACC,aAAAA,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,WACA,GAAG,SACoC;CACvC,MAAM,sBAAA,GAAA,MAAA,QAA4C,KAAK;CAEvD,MAAM,kBAAkB,cAA+B;EACrD,MAAM,YAAY,mBAAmB;AACrC,MAAI,CAAC,UAAW;EAEhB,MAAM,cAAc,WAAW,iBAAiB,UAAU,CAA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O;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACFC,mBAAAA,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;EAEDC,mBAAAA,YAAY;GACV,OAAO;GACP,cAAc;GACd,KAAK;GACL,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACFN,mBAAAA,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"}
|
|
1
|
+
{"version":3,"file":"NestedWidget-B24yMkV4.cjs","names":["ChevronLeft","ChevronRight","useWidgetInteraction","borderWidthClasses","borderColorClasses","MediaRenderer","getMediaPropsFromShareable","gapValues","getFontSizeField","getColorField","getHeightField","getPaddingField","getBorderRadiusField","getBorderWidthField","getBorderColorField","getGapField"],"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,iBAAA,GAAA,kBAAA,MAAA,k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GACL,OAAO;GACP,qBAAqB;GACtB;EACDE,mBAAAA,iBAAiB;GACf,OAAO;GACP,cAAc;GACd,KAAK;GACL,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EACFC,mBAAAA,cAAc;GACZ,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB,CAAC;EAEFC,mBAAAA,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;EACDC,mBAAAA,gBAAgB;GACd,cAAc;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACFC,mBAAAA,qBAAqB;GACnB,cAAc;GACd,OAAO;GACP,KAAK;GACL,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACFC,mBAAAA,oBAAoB;GAClB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACFC,mBAAAA,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;EAEDC,mBAAAA,YAAY;GACV,OAAO;GACP,cAAc;GACd,KAAK;GACL,aAAa;GACb,KAAK;GACL,OAAO;GACR,CAAC;EACFN,mBAAAA,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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Vn as __exportAll } from "./src-BfINy9nC.mjs";
|
|
2
|
-
import { n as useWidgetInteraction } from "./WidgetInteractionContext-
|
|
2
|
+
import { n as useWidgetInteraction } from "./WidgetInteractionContext-IsMo73Ka.mjs";
|
|
3
3
|
import { f as getGapField, i as getBorderColorField, l as getColorField, m as getPaddingField, n as borderWidthClasses, o as getBorderRadiusField, p as getHeightField, r as gapValues, s as getBorderWidthField, t as borderColorClasses, u as getFontSizeField } from "./registries-B2aW34Dg.mjs";
|
|
4
4
|
import { n as getMediaPropsFromShareable, t as MediaRenderer } from "./MediaRenderer-BgMdmkkL.mjs";
|
|
5
5
|
import { useRef } from "react";
|
|
@@ -385,4 +385,4 @@ const nestedWidgetPropertySchema = {
|
|
|
385
385
|
//#endregion
|
|
386
386
|
export { NestedWidget_exports as n, nestedWidgetPropertySchema as r, NestedWidget as t };
|
|
387
387
|
|
|
388
|
-
//# sourceMappingURL=NestedWidget-
|
|
388
|
+
//# sourceMappingURL=NestedWidget-D31rZhTR.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestedWidget-DMhmCZT6.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,WACA,GAAG,SACoC;CACvC,MAAM,qBAAqB,OAAuB,KAAK;CAEvD,MAAM,kBAAkB,cAA+B;EACrD,MAAM,YAAY,mBAAmB;AACrC,MAAI,CAAC,UAAW;EAEhB,MAAM,cAAc,WAAW,iBAAiB,UAAU,CAAC,IAAI,IAAI;EAGnE,MAAM,gBAFY,UAAU,mBACC,eAAe,KACX;AAEjC,YAAU,SAAS;GACjB,MACE,UAAU,cACT,cAAc,SAAS,eAAe,CAAC;GAC1C,UAAU;GACX,CAAC;;CAKJ,MAAM,qBAAqB,iBAAiB,SAAS,QAAQ;CAE7D,MAAM,EAAE,gBAAgB,sBAAsB;CAE9C,MAAM,iBAAiB,WAAW,SAAS;CAE3C,MAAM,wBAA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iB;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"}
|
|
1
|
+
{"version":3,"file":"NestedWidget-D31rZhTR.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\",\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;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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require("./chunk-9hOWP6kD.cjs");
|
|
2
|
-
require("./WidgetInteractionContext-
|
|
2
|
+
require("./WidgetInteractionContext-D9dBJ-39.cjs");
|
|
3
3
|
require("./registries-MpWTUak_.cjs");
|
|
4
4
|
require("./fields-DbTpcT4E.cjs");
|
|
5
5
|
require("./MediaRenderer-m_d4GHu0.cjs");
|
|
6
|
-
const require_NestedWidget = require("./NestedWidget-
|
|
6
|
+
const require_NestedWidget = require("./NestedWidget-B24yMkV4.cjs");
|
|
7
7
|
exports.nestedWidgetPropertySchema = require_NestedWidget.nestedWidgetPropertySchema;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
require("./chunk-9hOWP6kD.cjs");
|
|
2
|
-
require("./build-widget-registry-
|
|
2
|
+
require("./build-widget-registry-CWQ0YvEy.cjs");
|
|
3
3
|
require("./ScreenRenderer-DQ7DQNH1.cjs");
|
|
4
4
|
require("./use-account-CDm-HlHX.cjs");
|
|
5
5
|
require("./use-optional-store-CIM4spDu.cjs");
|
|
6
6
|
require("./use-mysite-portal-B0Mrv9jq.cjs");
|
|
7
7
|
require("./Combobox-B_-Ka9B4.cjs");
|
|
8
|
-
require("./FluidProvider-
|
|
8
|
+
require("./FluidProvider-XONLsJbE.cjs");
|
|
9
9
|
require("./ContactsTranslationBridge-CnMDoj7F.cjs");
|
|
10
10
|
require("./prop-types-DFk57_Go.cjs");
|
|
11
11
|
require("./MobileBottomSheet-DDGmDuV6.cjs");
|
|
12
12
|
require("./registry-context-DLWP4Bzy.cjs");
|
|
13
|
-
require("./WidgetInteractionContext-
|
|
13
|
+
require("./WidgetInteractionContext-D9dBJ-39.cjs");
|
|
14
14
|
require("./WidgetRenderStateContext-C6wVdsJR.cjs");
|
|
15
|
-
require("./QuickLinksWidget-
|
|
15
|
+
require("./QuickLinksWidget-CLBvaogv.cjs");
|
|
16
16
|
require("./static-dict-adapter-BCgoKiVT.cjs");
|
|
17
17
|
require("./SearchSort-BFE4vK5I.cjs");
|
|
18
18
|
require("./use-share-link-CwfwFW1s.cjs");
|
|
@@ -27,8 +27,8 @@ require("./registries-MpWTUak_.cjs");
|
|
|
27
27
|
require("./fields-DbTpcT4E.cjs");
|
|
28
28
|
require("./TextWidget-CS5a4S8C.cjs");
|
|
29
29
|
require("./AlertWidget-DftCRqlz.cjs");
|
|
30
|
-
require("./use-internal-link-
|
|
31
|
-
require("./AnnouncementWidget-
|
|
30
|
+
require("./use-internal-link-IcDHjPGp.cjs");
|
|
31
|
+
require("./AnnouncementWidget-Dh6nKAqT.cjs");
|
|
32
32
|
require("./BulletListWidget-COVpUMKJ.cjs");
|
|
33
33
|
require("./preview-context-DDYz757l.cjs");
|
|
34
34
|
require("./CalendarWidget-BzIXj7QC.cjs");
|
|
@@ -38,33 +38,33 @@ require("./WidgetLoadingSkeleton-CyBzfeHa.cjs");
|
|
|
38
38
|
require("./CardWidget-CLNvCUaU.cjs");
|
|
39
39
|
require("./helpers-BNPN4U1M.cjs");
|
|
40
40
|
require("./MediaRenderer-m_d4GHu0.cjs");
|
|
41
|
-
require("./CarouselWidget-
|
|
42
|
-
require("./CatchUpWidget-
|
|
41
|
+
require("./CarouselWidget-BETNqs_K.cjs");
|
|
42
|
+
require("./CatchUpWidget-CqAHpCJP.cjs");
|
|
43
43
|
require("./ChartWidget-BWbt8251.cjs");
|
|
44
44
|
require("./ContainerWidget-D0yiDKgl.cjs");
|
|
45
45
|
require("./EmbedWidget-CHeKoaGY.cjs");
|
|
46
|
-
require("./use-link-action-
|
|
47
|
-
require("./ImageWidget-
|
|
48
|
-
require("./LinkWidget-
|
|
49
|
-
require("./ListWidget-
|
|
46
|
+
require("./use-link-action-DzA9AQsE.cjs");
|
|
47
|
+
require("./ImageWidget-CksrA9rH.cjs");
|
|
48
|
+
require("./LinkWidget-Dvp6-Dow.cjs");
|
|
49
|
+
require("./ListWidget-CH-zz3sb.cjs");
|
|
50
50
|
require("./MySiteWidget-Jsvzw271.cjs");
|
|
51
|
-
require("./NestedWidget-
|
|
51
|
+
require("./NestedWidget-B24yMkV4.cjs");
|
|
52
52
|
require("./QuoteWidget-C2kEZlQK.cjs");
|
|
53
|
-
require("./QuickShareWidget-
|
|
54
|
-
require("./RecentActivityWidget-
|
|
53
|
+
require("./QuickShareWidget-wxRcBUkf.cjs");
|
|
54
|
+
require("./RecentActivityWidget-zBOY0c_B.cjs");
|
|
55
55
|
require("./activity-presentation-Bant06dK.cjs");
|
|
56
56
|
require("./SeparatorWidget-CK5hxebb.cjs");
|
|
57
57
|
require("./SpacerWidget-haCKQ_2B.cjs");
|
|
58
|
-
require("./TableWidget-
|
|
58
|
+
require("./TableWidget-DNjUA2Il.cjs");
|
|
59
59
|
require("./MobileActionSheet-C55s_pSf.cjs");
|
|
60
60
|
require("./ToDoWidget-KKMjWPRA.cjs");
|
|
61
61
|
require("./ResponsiveDialog-BklGXwta.cjs");
|
|
62
|
-
require("./VideoWidget-
|
|
63
|
-
require("./ShopWidget-
|
|
62
|
+
require("./VideoWidget-bf-gkCfx.cjs");
|
|
63
|
+
require("./ShopWidget-CCITGTSs.cjs");
|
|
64
64
|
require("./translation-adapter-CmtAadJw.cjs");
|
|
65
65
|
require("./translation-adapter-OuQSiy66.cjs");
|
|
66
66
|
require("./translation-adapter-CzeNfQ2w.cjs");
|
|
67
67
|
require("./ScreenHeaderContext-Zbv8SACh.cjs");
|
|
68
|
-
const require_OrdersScreen = require("./OrdersScreen-
|
|
68
|
+
const require_OrdersScreen = require("./OrdersScreen-Xs90dlpC.cjs");
|
|
69
69
|
exports.OrdersScreen = require_OrdersScreen.OrdersScreen;
|
|
70
70
|
exports.ordersScreenPropertySchema = require_OrdersScreen.ordersScreenPropertySchema;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { N as Input, _ as Skeleton, _n as BreadcrumbLink, bn as BreadcrumbSeparator, gn as BreadcrumbItem, hn as Breadcrumb, m as fluidToast, vn as BreadcrumbList, yn as BreadcrumbPage, zn as cn } from "./src-BfINy9nC.mjs";
|
|
2
|
-
import { A as isCardPaymentDescriptor, B as normalizeCardBrand, H as usePortalTenantOrder, I as resolvePaymentMethodDisplay, M as maskedCardLabelSegments, N as normalizePaymentDescriptor, P as paymentDescriptorLabel, U as useInfiniteCustomerOrders, V as formatOrderTotal, k as buildStaticMapUrl } from "./build-widget-registry-
|
|
3
|
-
import { d as ordersDomain, u as createOrdersTranslationAdapter } from "./FluidProvider-
|
|
2
|
+
import { A as isCardPaymentDescriptor, B as normalizeCardBrand, H as usePortalTenantOrder, I as resolvePaymentMethodDisplay, M as maskedCardLabelSegments, N as normalizePaymentDescriptor, P as paymentDescriptorLabel, U as useInfiniteCustomerOrders, V as formatOrderTotal, k as buildStaticMapUrl } from "./build-widget-registry-70KBtqiR.mjs";
|
|
3
|
+
import { d as ordersDomain, u as createOrdersTranslationAdapter } from "./FluidProvider-BRgNyDk3.mjs";
|
|
4
4
|
import { i as useFluidContext } from "./ContactsTranslationBridge-DMW-aBw8.mjs";
|
|
5
5
|
import { a as useActiveLocale, r as useDomainDict } from "./static-dict-adapter-DUyazFbx.mjs";
|
|
6
6
|
import { t as createTranslationContext } from "./translation-api-context-factory-BTpIuUF0.mjs";
|
|
@@ -1311,4 +1311,4 @@ const ordersScreenPropertySchema = {
|
|
|
1311
1311
|
//#endregion
|
|
1312
1312
|
export { ordersScreenPropertySchema as n, OrdersScreen as t };
|
|
1313
1313
|
|
|
1314
|
-
//# sourceMappingURL=OrdersScreen-
|
|
1314
|
+
//# sourceMappingURL=OrdersScreen-CHSqar4N.mjs.map
|