@fluid-app/portal-widgets 0.1.17 → 0.1.18

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.
Files changed (32) hide show
  1. package/dist/{CarouselWidget-BJvLjY7H.mjs → CarouselWidget-MOGejQHD.mjs} +24 -6
  2. package/dist/{CarouselWidget-BJvLjY7H.mjs.map → CarouselWidget-MOGejQHD.mjs.map} +1 -1
  3. package/dist/{CarouselWidget-Bdn0LVXT.cjs → CarouselWidget-PEm6vktC.cjs} +24 -6
  4. package/dist/{CarouselWidget-Bdn0LVXT.cjs.map → CarouselWidget-PEm6vktC.cjs.map} +1 -1
  5. package/dist/{ChartWidget-B3GcdLqH.mjs → ChartWidget-7jEGoije.mjs} +1 -4
  6. package/dist/{ChartWidget-B3GcdLqH.mjs.map → ChartWidget-7jEGoije.mjs.map} +1 -1
  7. package/dist/{ChartWidget-DQB7K6S0.cjs → ChartWidget-aspz2XF6.cjs} +1 -4
  8. package/dist/{ChartWidget-DQB7K6S0.cjs.map → ChartWidget-aspz2XF6.cjs.map} +1 -1
  9. package/dist/{EmbedWidget-mv5ce32s.cjs → EmbedWidget-BENxbwxX.cjs} +1 -4
  10. package/dist/{EmbedWidget-mv5ce32s.cjs.map → EmbedWidget-BENxbwxX.cjs.map} +1 -1
  11. package/dist/{EmbedWidget-ChLVA_9a.mjs → EmbedWidget-RuCm5uOj.mjs} +1 -4
  12. package/dist/{EmbedWidget-ChLVA_9a.mjs.map → EmbedWidget-RuCm5uOj.mjs.map} +1 -1
  13. package/dist/{ImageWidget-DMubcgat.mjs → ImageWidget--owpCpb0.mjs} +1 -4
  14. package/dist/{ImageWidget-DMubcgat.mjs.map → ImageWidget--owpCpb0.mjs.map} +1 -1
  15. package/dist/{ImageWidget-DFt4mJJx.cjs → ImageWidget-B2stGyqB.cjs} +1 -4
  16. package/dist/{ImageWidget-DFt4mJJx.cjs.map → ImageWidget-B2stGyqB.cjs.map} +1 -1
  17. package/dist/{NestedWidget-CNkwGwhM.mjs → NestedWidget-BaRb7Z5r.mjs} +1 -4
  18. package/dist/{NestedWidget-CNkwGwhM.mjs.map → NestedWidget-BaRb7Z5r.mjs.map} +1 -1
  19. package/dist/{NestedWidget-ofk9O-t1.cjs → NestedWidget-Dbo3dXEi.cjs} +1 -4
  20. package/dist/{NestedWidget-ofk9O-t1.cjs.map → NestedWidget-Dbo3dXEi.cjs.map} +1 -1
  21. package/dist/{SpacerWidget-Bgz6701y.cjs → SpacerWidget-BFboILmz.cjs} +25 -7
  22. package/dist/{SpacerWidget-Bgz6701y.cjs.map → SpacerWidget-BFboILmz.cjs.map} +1 -1
  23. package/dist/{SpacerWidget-DHGoW6eu.mjs → SpacerWidget-Cc0IuKda.mjs} +25 -7
  24. package/dist/{SpacerWidget-DHGoW6eu.mjs.map → SpacerWidget-Cc0IuKda.mjs.map} +1 -1
  25. package/dist/{VideoWidget-SODAPZO4.cjs → VideoWidget-D3Fw1jZE.cjs} +1 -4
  26. package/dist/{VideoWidget-SODAPZO4.cjs.map → VideoWidget-D3Fw1jZE.cjs.map} +1 -1
  27. package/dist/{VideoWidget-D6C_jHOF.mjs → VideoWidget-D_1kluGw.mjs} +1 -4
  28. package/dist/VideoWidget-D_1kluGw.mjs.map +1 -0
  29. package/dist/widgets/index.cjs +14 -14
  30. package/dist/widgets/index.mjs +14 -14
  31. package/package.json +2 -2
  32. package/dist/VideoWidget-D6C_jHOF.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SpacerWidget-DHGoW6eu.mjs","names":[],"sources":["../src/widgets/SpacerWidget.tsx"],"sourcesContent":["import {\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport { faArrowsUpDown } from \"@fortawesome/pro-regular-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\n\ntype SpacerWidgetProps = ComponentProps<\"div\"> & {\n /**\n * Custom height as a CSS value (e.g., \"128px\", \"8rem\", \"20vh\")\n */\n customHeight?: string;\n /**\n * Not customizable, determines if we should show a preview image in the container\n */\n previewMode?: boolean;\n};\n\nexport function SpacerWidget({\n customHeight = \"128px\",\n previewMode = false,\n className,\n style,\n ...props\n}: SpacerWidgetProps): React.JSX.Element {\n return (\n <div\n className={`w-full ${className ?? \"\"}`}\n style={{ height: customHeight, ...style }}\n aria-hidden=\"true\"\n {...props}\n >\n {previewMode && (\n <div className=\"border-muted-400 bg-muted text-muted-foreground flex h-full w-full items-center justify-center gap-1 border border-dashed\">\n <FontAwesomeIcon icon={faArrowsUpDown} />\n <span>SPACER</span>\n </div>\n )}\n </div>\n );\n}\n\nexport const spacerWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"SpacerWidget\",\n displayName: \"Spacer\",\n fields: [\n getHeightField({\n key: \"customHeight\",\n label: \"Height\",\n description: \"Height of the spacer\",\n min: 1,\n max: 1200,\n step: 1,\n defaultValue: \"128px\",\n group: \"Spacing\",\n }),\n ],\n};\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,aAAa,EAC3B,eAAe,SACf,cAAc,OACd,WACA,OACA,GAAG,SACoC;AACvC,QACE,oBAAC,OAAD;EACE,WAAW,UAAU,aAAa;EAClC,OAAO;GAAE,QAAQ;GAAc,GAAG;GAAO;EACzC,eAAY;EACZ,GAAI;YAEH,eACC,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,oBAAC,iBAAD,EAAiB,MAAM,gBAAkB,CAAA,EACzC,oBAAC,QAAD,EAAA,UAAM,UAAa,CAAA,CACf;;EAEJ,CAAA;;AAIV,MAAa,6BAAmD;CAC9D,YAAY;CACZ,aAAa;CACb,QAAQ,CACN,eAAe;EACb,KAAK;EACL,OAAO;EACP,aAAa;EACb,KAAK;EACL,KAAK;EACL,MAAM;EACN,cAAc;EACd,OAAO;EACR,CAAC,CACH;CACF"}
1
+ {"version":3,"file":"SpacerWidget-Cc0IuKda.mjs","names":[],"sources":["../src/widgets/SpacerWidget.tsx"],"sourcesContent":["import {\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport { faArrowsUpDown } from \"@fortawesome/pro-regular-svg-icons\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\n\ntype SpacerWidgetProps = ComponentProps<\"div\"> & {\n /**\n * Custom height as a CSS value (e.g., \"128px\", \"8rem\", \"20vh\")\n */\n customHeight?: string;\n /**\n * Not customizable, determines if we should show a preview image in the container\n */\n previewMode?: boolean;\n};\n\nexport function SpacerWidget({\n customHeight = \"128px\",\n previewMode = false,\n className,\n style,\n ...props\n}: SpacerWidgetProps): React.JSX.Element {\n return (\n <div\n className={`w-full ${className ?? \"\"}`}\n style={{ height: customHeight, ...style }}\n aria-hidden=\"true\"\n {...props}\n >\n {previewMode && (\n <div className=\"border-muted-400 bg-muted text-muted-foreground flex h-full w-full items-center justify-center gap-1 border border-dashed\">\n <FontAwesomeIcon icon={faArrowsUpDown} />\n <span>SPACER</span>\n </div>\n )}\n </div>\n );\n}\n\nexport const spacerWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"SpacerWidget\",\n displayName: \"Spacer\",\n fields: [\n {\n key: \"customHeight\",\n label: \"Height\",\n type: \"cssUnit\",\n description: \"Height of the spacer\",\n defaultValue: \"128px\",\n allowedUnits: [\"px\", \"vh\", \"rem\"],\n minByUnit: { px: 1, vh: 1, rem: 0.25 },\n maxByUnit: { px: 2000, vh: 100, rem: 125 },\n stepByUnit: { px: 1, vh: 1, rem: 0.25 },\n group: \"Spacing\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,aAAa,EAC3B,eAAe,SACf,cAAc,OACd,WACA,OACA,GAAG,SACoC;AACvC,QACE,oBAAC,OAAD;EACE,WAAW,UAAU,aAAa;EAClC,OAAO;GAAE,QAAQ;GAAc,GAAG;GAAO;EACzC,eAAY;EACZ,GAAI;YAEH,eACC,qBAAC,OAAD;GAAK,WAAU;aAAf,CACE,oBAAC,iBAAD,EAAiB,MAAM,gBAAkB,CAAA,EACzC,oBAAC,QAAD,EAAA,UAAM,UAAa,CAAA,CACf;;EAEJ,CAAA;;AAIV,MAAa,6BAAmD;CAC9D,YAAY;CACZ,aAAa;CACb,QAAQ,CACN;EACE,KAAK;EACL,OAAO;EACP,MAAM;EACN,aAAa;EACb,cAAc;EACd,cAAc;GAAC;GAAM;GAAM;GAAM;EACjC,WAAW;GAAE,IAAI;GAAG,IAAI;GAAG,KAAK;GAAM;EACtC,WAAW;GAAE,IAAI;GAAM,IAAI;GAAK,KAAK;GAAK;EAC1C,YAAY;GAAE,IAAI;GAAG,IAAI;GAAG,KAAK;GAAM;EACvC,OAAO;EACR,CACF;CACF"}
@@ -104,9 +104,6 @@ const videoWidgetPropertySchema = {
104
104
  key: "fixedHeight",
105
105
  label: "Height",
106
106
  description: "Fixed height of the video container",
107
- min: 10,
108
- max: 1200,
109
- step: 10,
110
107
  defaultValue: "200px",
111
108
  tab: "styling",
112
109
  group: "Design",
@@ -206,4 +203,4 @@ Object.defineProperty(exports, "videoWidgetPropertySchema", {
206
203
  }
207
204
  });
208
205
 
209
- //# sourceMappingURL=VideoWidget-SODAPZO4.cjs.map
206
+ //# sourceMappingURL=VideoWidget-D3Fw1jZE.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"VideoWidget-SODAPZO4.cjs","names":["MediaRenderer"],"sources":["../src/widgets/VideoWidget.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n getBorderRadiusField,\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport type {\n BorderRadiusOptions,\n ShareableItem,\n} from \"@fluid-app/portal-core/types\";\nimport { MediaRenderer } from \"../components/MediaRenderer\";\n\ntype VideoWidgetProps = ComponentProps<\"div\"> & {\n src?: string;\n poster?: string;\n borderRadius?: BorderRadiusOptions;\n verticalSizing?: \"auto\" | \"fixed\";\n fixedHeight?: string;\n displayFit?: \"cover\" | \"contain\";\n focusPoint?: string;\n controls?: boolean;\n autoplay?: boolean;\n loop?: boolean;\n muted?: boolean;\n resource?: ShareableItem;\n useCustomUrl?: boolean;\n};\n\nexport function VideoWidget({\n src = \"\",\n poster = \"\",\n borderRadius = \"md\",\n verticalSizing = \"auto\",\n fixedHeight = \"200px\",\n displayFit = \"cover\",\n focusPoint,\n controls = true,\n autoplay = false,\n loop = false,\n muted = false,\n resource,\n useCustomUrl,\n}: VideoWidgetProps): React.JSX.Element {\n const effectiveSrc = useCustomUrl ? src : (resource?.videoUrl ?? src);\n const effectivePoster = useCustomUrl\n ? poster\n : (resource?.imageUrl ?? poster);\n\n const isFixed = verticalSizing === \"fixed\";\n\n return (\n <div\n className={`relative w-full overflow-hidden rounded-${borderRadius}`}\n style={isFixed ? { height: fixedHeight } : undefined}\n >\n <MediaRenderer\n mediaType=\"video\"\n src={effectiveSrc}\n poster={effectivePoster}\n objectFit={isFixed ? displayFit : undefined}\n focusPoint={isFixed ? focusPoint : undefined}\n controls={controls}\n autoplay={autoplay}\n loop={loop}\n muted={muted}\n />\n </div>\n );\n}\n\nexport const videoWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"VideoWidget\",\n displayName: \"Video\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"behavior\", label: \"Behavior\" },\n ],\n fields: [\n // Styling tab - Content group\n {\n key: \"resource\",\n label: \"Select Video\",\n type: \"resource\",\n description: \"Browse and select a video\",\n allowedTypes: [\"Medium\"],\n tab: \"styling\",\n group: \"Content\",\n },\n {\n key: \"useCustomUrl\",\n label: \"Use Custom URL\",\n type: \"boolean\",\n description: \"Enter a custom video URL instead of selecting media\",\n defaultValue: false,\n tab: \"styling\",\n group: \"Content\",\n },\n {\n key: \"src\",\n label: \"Video URL\",\n type: \"text\",\n description: \"The source URL of the video\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Content\",\n requiresKeyToBeTrue: \"useCustomUrl\",\n },\n {\n key: \"poster\",\n label: \"Poster Image URL\",\n type: \"text\",\n description: \"Thumbnail image displayed before video plays\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Content\",\n requiresKeyToBeTrue: \"useCustomUrl\",\n },\n\n // Styling tab - Design group\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the calendar container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"verticalSizing\",\n label: \"Vertical Sizing\",\n type: \"buttonGroup\",\n description: \"How the video height is determined\",\n options: [\n { label: \"Auto\", value: \"auto\" },\n { label: \"Fixed\", value: \"fixed\" },\n ],\n defaultValue: \"auto\",\n tab: \"styling\",\n group: \"Design\",\n },\n getHeightField({\n key: \"fixedHeight\",\n label: \"Height\",\n description: \"Fixed height of the video container\",\n min: 10,\n max: 1200,\n step: 10,\n defaultValue: \"200px\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n }),\n {\n key: \"displayFit\",\n label: \"Display Fit\",\n type: \"buttonGroup\",\n description: \"How the video fills its container\",\n options: [\n { label: \"Cover\", value: \"cover\" },\n { label: \"Contain\", value: \"contain\" },\n ],\n defaultValue: \"cover\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n },\n {\n key: \"focusPoint\",\n label: \"Focus Point\",\n type: \"contentPosition\",\n description: \"The focal point of the video within its container\",\n defaultValue: \"center\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n },\n\n // Behavior tab\n {\n key: \"controls\",\n label: \"Show Controls\",\n type: \"boolean\",\n description: \"Display video playback controls\",\n defaultValue: true,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"autoplay\",\n label: \"Autoplay\",\n type: \"boolean\",\n description: \"Automatically start playing the video\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"loop\",\n label: \"Loop\",\n type: \"boolean\",\n description: \"Repeat the video when it ends\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"muted\",\n label: \"Muted\",\n type: \"boolean\",\n description: \"Start with audio muted\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;AA6BA,SAAgB,YAAY,EAC1B,MAAM,IACN,SAAS,IACT,eAAe,MACf,iBAAiB,QACjB,cAAc,SACd,aAAa,SACb,YACA,WAAW,MACX,WAAW,OACX,OAAO,OACP,QAAQ,OACR,UACA,gBACsC;CACtC,MAAM,eAAe,eAAe,MAAO,UAAU,YAAY;CACjE,MAAM,kBAAkB,eACpB,SACC,UAAU,YAAY;CAE3B,MAAM,UAAU,mBAAmB;AAEnC,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,WAAW,2CAA2C;EACtD,OAAO,UAAU,EAAE,QAAQ,aAAa,GAAG,KAAA;YAE3C,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,eAAD;GACE,WAAU;GACV,KAAK;GACL,QAAQ;GACR,WAAW,UAAU,aAAa,KAAA;GAClC,YAAY,UAAU,aAAa,KAAA;GACzB;GACA;GACJ;GACC;GACP,CAAA;EACE,CAAA;;AAIV,MAAa,4BAAkD;CAC7D,YAAY;CACZ,aAAa;CACb,YAAY,CACV;EAAE,IAAI;EAAW,OAAO;EAAW,EACnC;EAAE,IAAI;EAAY,OAAO;EAAY,CACtC;CACD,QAAQ;EAEN;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc,CAAC,SAAS;GACxB,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,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aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACF;CACF"}
1
+ {"version":3,"file":"VideoWidget-D3Fw1jZE.cjs","names":["MediaRenderer"],"sources":["../src/widgets/VideoWidget.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n getBorderRadiusField,\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport type {\n BorderRadiusOptions,\n ShareableItem,\n} from \"@fluid-app/portal-core/types\";\nimport { MediaRenderer } from \"../components/MediaRenderer\";\n\ntype VideoWidgetProps = ComponentProps<\"div\"> & {\n src?: string;\n poster?: string;\n borderRadius?: BorderRadiusOptions;\n verticalSizing?: \"auto\" | \"fixed\";\n fixedHeight?: string;\n displayFit?: \"cover\" | \"contain\";\n focusPoint?: string;\n controls?: boolean;\n autoplay?: boolean;\n loop?: boolean;\n muted?: boolean;\n resource?: ShareableItem;\n useCustomUrl?: boolean;\n};\n\nexport function VideoWidget({\n src = \"\",\n poster = \"\",\n borderRadius = \"md\",\n verticalSizing = \"auto\",\n fixedHeight = \"200px\",\n displayFit = \"cover\",\n focusPoint,\n controls = true,\n autoplay = false,\n loop = false,\n muted = false,\n resource,\n useCustomUrl,\n}: VideoWidgetProps): React.JSX.Element {\n const effectiveSrc = useCustomUrl ? src : (resource?.videoUrl ?? src);\n const effectivePoster = useCustomUrl\n ? poster\n : (resource?.imageUrl ?? poster);\n\n const isFixed = verticalSizing === \"fixed\";\n\n return (\n <div\n className={`relative w-full overflow-hidden rounded-${borderRadius}`}\n style={isFixed ? { height: fixedHeight } : undefined}\n >\n <MediaRenderer\n mediaType=\"video\"\n src={effectiveSrc}\n poster={effectivePoster}\n objectFit={isFixed ? displayFit : undefined}\n focusPoint={isFixed ? focusPoint : undefined}\n controls={controls}\n autoplay={autoplay}\n loop={loop}\n muted={muted}\n />\n </div>\n );\n}\n\nexport const videoWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"VideoWidget\",\n displayName: \"Video\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"behavior\", label: \"Behavior\" },\n ],\n fields: [\n // Styling tab - Content group\n {\n key: \"resource\",\n label: \"Select Video\",\n type: \"resource\",\n description: \"Browse and select a video\",\n allowedTypes: [\"Medium\"],\n tab: \"styling\",\n group: \"Content\",\n },\n {\n key: \"useCustomUrl\",\n label: \"Use Custom URL\",\n type: \"boolean\",\n description: \"Enter a custom video URL instead of selecting media\",\n defaultValue: false,\n tab: \"styling\",\n group: \"Content\",\n },\n {\n key: \"src\",\n label: \"Video URL\",\n type: \"text\",\n description: \"The source URL of the video\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Content\",\n requiresKeyToBeTrue: \"useCustomUrl\",\n },\n {\n key: \"poster\",\n label: \"Poster Image URL\",\n type: \"text\",\n description: \"Thumbnail image displayed before video plays\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Content\",\n requiresKeyToBeTrue: \"useCustomUrl\",\n },\n\n // Styling tab - Design group\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the calendar container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"verticalSizing\",\n label: \"Vertical Sizing\",\n type: \"buttonGroup\",\n description: \"How the video height is determined\",\n options: [\n { label: \"Auto\", value: \"auto\" },\n { label: \"Fixed\", value: \"fixed\" },\n ],\n defaultValue: \"auto\",\n tab: \"styling\",\n group: \"Design\",\n },\n getHeightField({\n key: \"fixedHeight\",\n label: \"Height\",\n description: \"Fixed height of the video container\",\n defaultValue: \"200px\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n }),\n {\n key: \"displayFit\",\n label: \"Display Fit\",\n type: \"buttonGroup\",\n description: \"How the video fills its container\",\n options: [\n { label: \"Cover\", value: \"cover\" },\n { label: \"Contain\", value: \"contain\" },\n ],\n defaultValue: \"cover\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n },\n {\n key: \"focusPoint\",\n label: \"Focus Point\",\n type: \"contentPosition\",\n description: \"The focal point of the video within its container\",\n defaultValue: \"center\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n },\n\n // Behavior tab\n {\n key: \"controls\",\n label: \"Show Controls\",\n type: \"boolean\",\n description: \"Display video playback controls\",\n defaultValue: true,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"autoplay\",\n label: \"Autoplay\",\n type: \"boolean\",\n description: \"Automatically start playing the video\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"loop\",\n label: \"Loop\",\n type: \"boolean\",\n description: \"Repeat the video when it ends\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"muted\",\n label: \"Muted\",\n type: \"boolean\",\n description: \"Start with audio muted\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;AA6BA,SAAgB,YAAY,EAC1B,MAAM,IACN,SAAS,IACT,eAAe,MACf,iBAAiB,QACjB,cAAc,SACd,aAAa,SACb,YACA,WAAW,MACX,WAAW,OACX,OAAO,OACP,QAAQ,OACR,UACA,gBACsC;CACtC,MAAM,eAAe,eAAe,MAAO,UAAU,YAAY;CACjE,MAAM,kBAAkB,eACpB,SACC,UAAU,YAAY;CAE3B,MAAM,UAAU,mBAAmB;AAEnC,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,WAAW,2CAA2C;EACtD,OAAO,UAAU,EAAE,QAAQ,aAAa,GAAG,KAAA;YAE3C,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,eAAD;GACE,WAAU;GACV,KAAK;GACL,QAAQ;GACR,WAAW,UAAU,aAAa,KAAA;GAClC,YAAY,UAAU,aAAa,KAAA;GACzB;GACA;G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GACd,KAAK;GACL,OAAO;GACP,kBAAkB;IAAE,KAAK;IAAkB,OAAO;IAAS;GAC5D;EAGD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACF;CACF"}
@@ -104,9 +104,6 @@ const videoWidgetPropertySchema = {
104
104
  key: "fixedHeight",
105
105
  label: "Height",
106
106
  description: "Fixed height of the video container",
107
- min: 10,
108
- max: 1200,
109
- step: 10,
110
107
  defaultValue: "200px",
111
108
  tab: "styling",
112
109
  group: "Design",
@@ -189,4 +186,4 @@ const videoWidgetPropertySchema = {
189
186
  //#endregion
190
187
  export { VideoWidget_exports as n, videoWidgetPropertySchema as r, VideoWidget as t };
191
188
 
192
- //# sourceMappingURL=VideoWidget-D6C_jHOF.mjs.map
189
+ //# sourceMappingURL=VideoWidget-D_1kluGw.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VideoWidget-D_1kluGw.mjs","names":[],"sources":["../src/widgets/VideoWidget.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n getBorderRadiusField,\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport type {\n BorderRadiusOptions,\n ShareableItem,\n} from \"@fluid-app/portal-core/types\";\nimport { MediaRenderer } from \"../components/MediaRenderer\";\n\ntype VideoWidgetProps = ComponentProps<\"div\"> & {\n src?: string;\n poster?: string;\n borderRadius?: BorderRadiusOptions;\n verticalSizing?: \"auto\" | \"fixed\";\n fixedHeight?: string;\n displayFit?: \"cover\" | \"contain\";\n focusPoint?: string;\n controls?: boolean;\n autoplay?: boolean;\n loop?: boolean;\n muted?: boolean;\n resource?: ShareableItem;\n useCustomUrl?: boolean;\n};\n\nexport function VideoWidget({\n src = \"\",\n poster = \"\",\n borderRadius = \"md\",\n verticalSizing = \"auto\",\n fixedHeight = \"200px\",\n displayFit = \"cover\",\n focusPoint,\n controls = true,\n autoplay = false,\n loop = false,\n muted = false,\n resource,\n useCustomUrl,\n}: VideoWidgetProps): React.JSX.Element {\n const effectiveSrc = useCustomUrl ? src : (resource?.videoUrl ?? src);\n const effectivePoster = useCustomUrl\n ? poster\n : (resource?.imageUrl ?? poster);\n\n const isFixed = verticalSizing === \"fixed\";\n\n return (\n <div\n className={`relative w-full overflow-hidden rounded-${borderRadius}`}\n style={isFixed ? { height: fixedHeight } : undefined}\n >\n <MediaRenderer\n mediaType=\"video\"\n src={effectiveSrc}\n poster={effectivePoster}\n objectFit={isFixed ? displayFit : undefined}\n focusPoint={isFixed ? focusPoint : undefined}\n controls={controls}\n autoplay={autoplay}\n loop={loop}\n muted={muted}\n />\n </div>\n );\n}\n\nexport const videoWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"VideoWidget\",\n displayName: \"Video\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"behavior\", label: \"Behavior\" },\n ],\n fields: [\n // Styling tab - Content group\n {\n key: \"resource\",\n label: \"Select Video\",\n type: \"resource\",\n description: \"Browse and select a video\",\n allowedTypes: [\"Medium\"],\n tab: \"styling\",\n group: \"Content\",\n },\n {\n key: \"useCustomUrl\",\n label: \"Use Custom URL\",\n type: \"boolean\",\n description: \"Enter a custom video URL instead of selecting media\",\n defaultValue: false,\n tab: \"styling\",\n group: \"Content\",\n },\n {\n key: \"src\",\n label: \"Video URL\",\n type: \"text\",\n description: \"The source URL of the video\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Content\",\n requiresKeyToBeTrue: \"useCustomUrl\",\n },\n {\n key: \"poster\",\n label: \"Poster Image URL\",\n type: \"text\",\n description: \"Thumbnail image displayed before video plays\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Content\",\n requiresKeyToBeTrue: \"useCustomUrl\",\n },\n\n // Styling tab - Design group\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the calendar container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"verticalSizing\",\n label: \"Vertical Sizing\",\n type: \"buttonGroup\",\n description: \"How the video height is determined\",\n options: [\n { label: \"Auto\", value: \"auto\" },\n { label: \"Fixed\", value: \"fixed\" },\n ],\n defaultValue: \"auto\",\n tab: \"styling\",\n group: \"Design\",\n },\n getHeightField({\n key: \"fixedHeight\",\n label: \"Height\",\n description: \"Fixed height of the video container\",\n defaultValue: \"200px\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n }),\n {\n key: \"displayFit\",\n label: \"Display Fit\",\n type: \"buttonGroup\",\n description: \"How the video fills its container\",\n options: [\n { label: \"Cover\", value: \"cover\" },\n { label: \"Contain\", value: \"contain\" },\n ],\n defaultValue: \"cover\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n },\n {\n key: \"focusPoint\",\n label: \"Focus Point\",\n type: \"contentPosition\",\n description: \"The focal point of the video within its container\",\n defaultValue: \"center\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n },\n\n // Behavior tab\n {\n key: \"controls\",\n label: \"Show Controls\",\n type: \"boolean\",\n description: \"Display video playback controls\",\n defaultValue: true,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"autoplay\",\n label: \"Autoplay\",\n type: \"boolean\",\n description: \"Automatically start playing the video\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"loop\",\n label: \"Loop\",\n type: \"boolean\",\n description: \"Repeat the video when it ends\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"muted\",\n label: \"Muted\",\n type: \"boolean\",\n description: \"Start with audio muted\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;AA6BA,SAAgB,YAAY,EAC1B,MAAM,IACN,SAAS,IACT,eAAe,MACf,iBAAiB,QACjB,cAAc,SACd,aAAa,SACb,YACA,WAAW,MACX,WAAW,OACX,OAAO,OACP,QAAQ,OACR,UACA,gBACsC;CACtC,MAAM,eAAe,eAAe,MAAO,UAAU,YAAY;CACjE,MAAM,kBAAkB,eACpB,SACC,UAAU,YAAY;CAE3B,MAAM,UAAU,mBAAmB;AAEnC,QACE,oBAAC,OAAD;EACE,WAAW,2CAA2C;EACtD,OAAO,UAAU,EAAE,QAAQ,aAAa,GAAG,KAAA;YAE3C,oBAAC,eAAD;GACE,WAAU;GACV,KAAK;GACL,QAAQ;GACR,WAAW,UAAU,aAAa,KAAA;GAClC,YAAY,UAAU,aAAa,KAAA;GACzB;GACA;GACJ;GACC;GACP,CAAA;EACE,CAAA;;AAIV,MAAa,4BAAkD;CAC7D,YAAY;CACZ,aAAa;CACb,YAAY,CACV;EAAE,IAAI;EAAW,OAAO;EAAW,EACnC;EAAE,IAAI;EAAY,OAAO;EAAY,CACtC;CACD,QAAQ;EAEN;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc,CAAC,SAAS;GACxB,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,qBAAqB;GACtB;EAGD,qBAAqB;GACnB,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EACF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,SAAS,CACP;IAAE,OAAO;IAAQ,OAAO;IAAQ,EAChC;IAAE,OAAO;IAAS,OAAO;IAAS,CACnC;GACD,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD,eAAe;GACb,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,kBAAkB;IAAE,KAAK;IAAkB,OAAO;IAAS;GAC5D,CAAC;EACF;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,SAAS,CACP;IAAE,OAAO;IAAS,OAAO;IAAS,EAClC;IAAE,OAAO;IAAW,OAAO;IAAW,CACvC;GACD,cAAc;GACd,KAAK;GACL,OAAO;GACP,kBAAkB;IAAE,KAAK;IAAkB,OAAO;IAAS;GAC5D;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACP,kBAAkB;IAAE,KAAK;IAAkB,OAAO;IAAS;GAC5D;EAGD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACD;GACE,KAAK;GACL,OAAO;GACP,MAAM;GACN,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;EACF;CACF"}
@@ -3,44 +3,44 @@ require("../chunk-CZWwpsFl.cjs");
3
3
  const require_TextWidget = require("../TextWidget-D6Ug_2Z1.cjs");
4
4
  const require_AlertWidget = require("../AlertWidget-AS_8Jjbd.cjs");
5
5
  const require_CalendarWidget = require("../CalendarWidget-DW7q6Q7_.cjs");
6
- const require_CarouselWidget = require("../CarouselWidget-Bdn0LVXT.cjs");
6
+ const require_CarouselWidget = require("../CarouselWidget-PEm6vktC.cjs");
7
7
  const require_CatchUpWidget = require("../CatchUpWidget-CZMptzf8.cjs");
8
- const require_ChartWidget = require("../ChartWidget-DQB7K6S0.cjs");
8
+ const require_ChartWidget = require("../ChartWidget-aspz2XF6.cjs");
9
9
  const require_LayoutWidget = require("../LayoutWidget-C4-ka0Ge.cjs");
10
10
  const require_ContainerWidget = require("../ContainerWidget-rGsakG66.cjs");
11
- const require_EmbedWidget = require("../EmbedWidget-mv5ce32s.cjs");
12
- const require_ImageWidget = require("../ImageWidget-DFt4mJJx.cjs");
11
+ const require_EmbedWidget = require("../EmbedWidget-BENxbwxX.cjs");
12
+ const require_ImageWidget = require("../ImageWidget-B2stGyqB.cjs");
13
13
  const require_ListWidget = require("../ListWidget-RHQ2fQXa.cjs");
14
14
  const require_MySiteWidget = require("../MySiteWidget-A_cYFgxJ.cjs");
15
- const require_NestedWidget = require("../NestedWidget-ofk9O-t1.cjs");
15
+ const require_NestedWidget = require("../NestedWidget-Dbo3dXEi.cjs");
16
16
  const require_QuickShareWidget = require("../QuickShareWidget-DWvgEy74.cjs");
17
17
  const require_RecentActivityWidget = require("../RecentActivityWidget-wODng8dt.cjs");
18
- const require_SpacerWidget = require("../SpacerWidget-Bgz6701y.cjs");
18
+ const require_SpacerWidget = require("../SpacerWidget-BFboILmz.cjs");
19
19
  const require_TableWidget = require("../TableWidget-TfQfFHft.cjs");
20
20
  const require_ToDoWidget = require("../ToDoWidget-Dvs0GDkx.cjs");
21
- const require_VideoWidget = require("../VideoWidget-SODAPZO4.cjs");
21
+ const require_VideoWidget = require("../VideoWidget-D3Fw1jZE.cjs");
22
22
  let _fluid_app_portal_core_registries = require("@fluid-app/portal-core/registries");
23
23
  //#region src/widgets/index.ts
24
24
  const widgetPropertySchemas = {
25
25
  AlertWidget: () => Promise.resolve().then(() => require("../AlertWidget-AS_8Jjbd.cjs")).then((n) => n.AlertWidget_exports).then((m) => m.alertWidgetPropertySchema),
26
26
  CalendarWidget: () => Promise.resolve().then(() => require("../CalendarWidget-DW7q6Q7_.cjs")).then((n) => n.CalendarWidget_exports).then((m) => m.calendarWidgetPropertySchema),
27
- CarouselWidget: () => Promise.resolve().then(() => require("../CarouselWidget-Bdn0LVXT.cjs")).then((n) => n.CarouselWidget_exports).then((m) => m.carouselWidgetPropertySchema),
27
+ CarouselWidget: () => Promise.resolve().then(() => require("../CarouselWidget-PEm6vktC.cjs")).then((n) => n.CarouselWidget_exports).then((m) => m.carouselWidgetPropertySchema),
28
28
  CatchUpWidget: () => Promise.resolve().then(() => require("../CatchUpWidget-CZMptzf8.cjs")).then((n) => n.CatchUpWidget_exports).then((m) => m.catchUpWidgetPropertySchema),
29
- ChartWidget: () => Promise.resolve().then(() => require("../ChartWidget-DQB7K6S0.cjs")).then((n) => n.ChartWidget_exports).then((m) => m.chartWidgetPropertySchema),
29
+ ChartWidget: () => Promise.resolve().then(() => require("../ChartWidget-aspz2XF6.cjs")).then((n) => n.ChartWidget_exports).then((m) => m.chartWidgetPropertySchema),
30
30
  ContainerWidget: () => Promise.resolve().then(() => require("../ContainerWidget-CHa4gVvV.cjs")).then((m) => m.containerWidgetPropertySchema),
31
- EmbedWidget: () => Promise.resolve().then(() => require("../EmbedWidget-mv5ce32s.cjs")).then((n) => n.EmbedWidget_exports).then((m) => m.embedWidgetPropertySchema),
32
- ImageWidget: () => Promise.resolve().then(() => require("../ImageWidget-DFt4mJJx.cjs")).then((n) => n.ImageWidget_exports).then((m) => m.imageWidgetPropertySchema),
31
+ EmbedWidget: () => Promise.resolve().then(() => require("../EmbedWidget-BENxbwxX.cjs")).then((n) => n.EmbedWidget_exports).then((m) => m.embedWidgetPropertySchema),
32
+ ImageWidget: () => Promise.resolve().then(() => require("../ImageWidget-B2stGyqB.cjs")).then((n) => n.ImageWidget_exports).then((m) => m.imageWidgetPropertySchema),
33
33
  LayoutWidget: () => Promise.resolve().then(() => require("../LayoutWidget-D4haEqTQ.cjs")).then((m) => m.layoutWidgetPropertySchema),
34
34
  ListWidget: () => Promise.resolve().then(() => require("../ListWidget-RHQ2fQXa.cjs")).then((n) => n.ListWidget_exports).then((m) => m.listWidgetPropertySchema),
35
35
  MySiteWidget: () => Promise.resolve().then(() => require("../MySiteWidget-A_cYFgxJ.cjs")).then((n) => n.MySiteWidget_exports).then((m) => m.mySiteWidgetPropertySchema),
36
- NestedWidget: () => Promise.resolve().then(() => require("../NestedWidget-ofk9O-t1.cjs")).then((n) => n.NestedWidget_exports).then((m) => m.nestedWidgetPropertySchema),
36
+ NestedWidget: () => Promise.resolve().then(() => require("../NestedWidget-Dbo3dXEi.cjs")).then((n) => n.NestedWidget_exports).then((m) => m.nestedWidgetPropertySchema),
37
37
  QuickShareWidget: () => Promise.resolve().then(() => require("../QuickShareWidget-DWvgEy74.cjs")).then((n) => n.QuickShareWidget_exports).then((m) => m.quickShareWidgetPropertySchema),
38
38
  RecentActivityWidget: () => Promise.resolve().then(() => require("../RecentActivityWidget-wODng8dt.cjs")).then((n) => n.RecentActivityWidget_exports).then((m) => m.recentActivityWidgetPropertySchema),
39
- SpacerWidget: () => Promise.resolve().then(() => require("../SpacerWidget-Bgz6701y.cjs")).then((n) => n.SpacerWidget_exports).then((m) => m.spacerWidgetPropertySchema),
39
+ SpacerWidget: () => Promise.resolve().then(() => require("../SpacerWidget-BFboILmz.cjs")).then((n) => n.SpacerWidget_exports).then((m) => m.spacerWidgetPropertySchema),
40
40
  TableWidget: () => Promise.resolve().then(() => require("../TableWidget-TfQfFHft.cjs")).then((n) => n.TableWidget_exports).then((m) => m.tableWidgetPropertySchema),
41
41
  TextWidget: () => Promise.resolve().then(() => require("../TextWidget-D6Ug_2Z1.cjs")).then((n) => n.TextWidget_exports).then((m) => m.textWidgetPropertySchema),
42
42
  ToDoWidget: () => Promise.resolve().then(() => require("../ToDoWidget-Dvs0GDkx.cjs")).then((n) => n.ToDoWidget_exports).then((m) => m.toDoWidgetPropertySchema),
43
- VideoWidget: () => Promise.resolve().then(() => require("../VideoWidget-SODAPZO4.cjs")).then((n) => n.VideoWidget_exports).then((m) => m.videoWidgetPropertySchema)
43
+ VideoWidget: () => Promise.resolve().then(() => require("../VideoWidget-D3Fw1jZE.cjs")).then((n) => n.VideoWidget_exports).then((m) => m.videoWidgetPropertySchema)
44
44
  };
45
45
  //#endregion
46
46
  exports.AlertWidget = require_AlertWidget.AlertWidget;
@@ -2,43 +2,43 @@ import { t as gapValues } from "../fields-wPOk-SmZ.mjs";
2
2
  import { r as textWidgetPropertySchema, t as TextWidget } from "../TextWidget-CL2H3vei.mjs";
3
3
  import { r as alertWidgetPropertySchema, t as AlertWidget } from "../AlertWidget-Dy6pBmXm.mjs";
4
4
  import { r as calendarWidgetPropertySchema, t as CalendarWidget } from "../CalendarWidget-DAHnT9Wn.mjs";
5
- import { r as carouselWidgetPropertySchema, t as CarouselWidget } from "../CarouselWidget-BJvLjY7H.mjs";
5
+ import { r as carouselWidgetPropertySchema, t as CarouselWidget } from "../CarouselWidget-MOGejQHD.mjs";
6
6
  import { r as catchUpWidgetPropertySchema, t as CatchUpWidget } from "../CatchUpWidget-vEP5scfy.mjs";
7
- import { r as chartWidgetPropertySchema, t as ChartWidget } from "../ChartWidget-B3GcdLqH.mjs";
7
+ import { r as chartWidgetPropertySchema, t as ChartWidget } from "../ChartWidget-7jEGoije.mjs";
8
8
  import { r as layoutWidgetPropertySchema, t as LayoutWidget } from "../LayoutWidget-BEi0yFpz.mjs";
9
9
  import { r as containerWidgetPropertySchema, t as ContainerWidget } from "../ContainerWidget-B-4hcPKJ.mjs";
10
- import { r as embedWidgetPropertySchema, t as EmbedWidget } from "../EmbedWidget-ChLVA_9a.mjs";
11
- import { r as imageWidgetPropertySchema, t as ImageWidget } from "../ImageWidget-DMubcgat.mjs";
10
+ import { r as embedWidgetPropertySchema, t as EmbedWidget } from "../EmbedWidget-RuCm5uOj.mjs";
11
+ import { r as imageWidgetPropertySchema, t as ImageWidget } from "../ImageWidget--owpCpb0.mjs";
12
12
  import { r as listWidgetPropertySchema, t as ListWidget } from "../ListWidget-C-jcsCb4.mjs";
13
13
  import { r as mySiteWidgetPropertySchema, t as MySiteWidget } from "../MySiteWidget-DariqlfU.mjs";
14
- import { r as nestedWidgetPropertySchema, t as NestedWidget } from "../NestedWidget-CNkwGwhM.mjs";
14
+ import { r as nestedWidgetPropertySchema, t as NestedWidget } from "../NestedWidget-BaRb7Z5r.mjs";
15
15
  import { r as quickShareWidgetPropertySchema, t as QuickShareWidget } from "../QuickShareWidget-DXq5lcDn.mjs";
16
16
  import { r as recentActivityWidgetPropertySchema, t as RecentActivityWidget } from "../RecentActivityWidget-BvncOdax.mjs";
17
- import { r as spacerWidgetPropertySchema, t as SpacerWidget } from "../SpacerWidget-DHGoW6eu.mjs";
17
+ import { r as spacerWidgetPropertySchema, t as SpacerWidget } from "../SpacerWidget-Cc0IuKda.mjs";
18
18
  import { r as tableWidgetPropertySchema, t as TableWidget } from "../TableWidget--yLJTqoW.mjs";
19
19
  import { r as toDoWidgetPropertySchema, t as ToDoWidget } from "../ToDoWidget-D8YIsl7y.mjs";
20
- import { r as videoWidgetPropertySchema, t as VideoWidget } from "../VideoWidget-D6C_jHOF.mjs";
20
+ import { r as videoWidgetPropertySchema, t as VideoWidget } from "../VideoWidget-D_1kluGw.mjs";
21
21
  //#region src/widgets/index.ts
22
22
  const widgetPropertySchemas = {
23
23
  AlertWidget: () => import("../AlertWidget-Dy6pBmXm.mjs").then((n) => n.n).then((m) => m.alertWidgetPropertySchema),
24
24
  CalendarWidget: () => import("../CalendarWidget-DAHnT9Wn.mjs").then((n) => n.n).then((m) => m.calendarWidgetPropertySchema),
25
- CarouselWidget: () => import("../CarouselWidget-BJvLjY7H.mjs").then((n) => n.n).then((m) => m.carouselWidgetPropertySchema),
25
+ CarouselWidget: () => import("../CarouselWidget-MOGejQHD.mjs").then((n) => n.n).then((m) => m.carouselWidgetPropertySchema),
26
26
  CatchUpWidget: () => import("../CatchUpWidget-vEP5scfy.mjs").then((n) => n.n).then((m) => m.catchUpWidgetPropertySchema),
27
- ChartWidget: () => import("../ChartWidget-B3GcdLqH.mjs").then((n) => n.n).then((m) => m.chartWidgetPropertySchema),
27
+ ChartWidget: () => import("../ChartWidget-7jEGoije.mjs").then((n) => n.n).then((m) => m.chartWidgetPropertySchema),
28
28
  ContainerWidget: () => import("../ContainerWidget-B-4hcPKJ.mjs").then((n) => n.n).then((m) => m.containerWidgetPropertySchema),
29
- EmbedWidget: () => import("../EmbedWidget-ChLVA_9a.mjs").then((n) => n.n).then((m) => m.embedWidgetPropertySchema),
30
- ImageWidget: () => import("../ImageWidget-DMubcgat.mjs").then((n) => n.n).then((m) => m.imageWidgetPropertySchema),
29
+ EmbedWidget: () => import("../EmbedWidget-RuCm5uOj.mjs").then((n) => n.n).then((m) => m.embedWidgetPropertySchema),
30
+ ImageWidget: () => import("../ImageWidget--owpCpb0.mjs").then((n) => n.n).then((m) => m.imageWidgetPropertySchema),
31
31
  LayoutWidget: () => import("../LayoutWidget-BEi0yFpz.mjs").then((n) => n.n).then((m) => m.layoutWidgetPropertySchema),
32
32
  ListWidget: () => import("../ListWidget-C-jcsCb4.mjs").then((n) => n.n).then((m) => m.listWidgetPropertySchema),
33
33
  MySiteWidget: () => import("../MySiteWidget-DariqlfU.mjs").then((n) => n.n).then((m) => m.mySiteWidgetPropertySchema),
34
- NestedWidget: () => import("../NestedWidget-CNkwGwhM.mjs").then((n) => n.n).then((m) => m.nestedWidgetPropertySchema),
34
+ NestedWidget: () => import("../NestedWidget-BaRb7Z5r.mjs").then((n) => n.n).then((m) => m.nestedWidgetPropertySchema),
35
35
  QuickShareWidget: () => import("../QuickShareWidget-DXq5lcDn.mjs").then((n) => n.n).then((m) => m.quickShareWidgetPropertySchema),
36
36
  RecentActivityWidget: () => import("../RecentActivityWidget-BvncOdax.mjs").then((n) => n.n).then((m) => m.recentActivityWidgetPropertySchema),
37
- SpacerWidget: () => import("../SpacerWidget-DHGoW6eu.mjs").then((n) => n.n).then((m) => m.spacerWidgetPropertySchema),
37
+ SpacerWidget: () => import("../SpacerWidget-Cc0IuKda.mjs").then((n) => n.n).then((m) => m.spacerWidgetPropertySchema),
38
38
  TableWidget: () => import("../TableWidget--yLJTqoW.mjs").then((n) => n.n).then((m) => m.tableWidgetPropertySchema),
39
39
  TextWidget: () => import("../TextWidget-CL2H3vei.mjs").then((n) => n.n).then((m) => m.textWidgetPropertySchema),
40
40
  ToDoWidget: () => import("../ToDoWidget-D8YIsl7y.mjs").then((n) => n.n).then((m) => m.toDoWidgetPropertySchema),
41
- VideoWidget: () => import("../VideoWidget-D6C_jHOF.mjs").then((n) => n.n).then((m) => m.videoWidgetPropertySchema)
41
+ VideoWidget: () => import("../VideoWidget-D_1kluGw.mjs").then((n) => n.n).then((m) => m.videoWidgetPropertySchema)
42
42
  };
43
43
  //#endregion
44
44
  export { AlertWidget, CalendarWidget, CarouselWidget, CatchUpWidget, ChartWidget, ContainerWidget, EmbedWidget, ImageWidget, LayoutWidget, ListWidget, MySiteWidget, NestedWidget, QuickShareWidget, RecentActivityWidget, SpacerWidget, TableWidget, TextWidget, ToDoWidget, VideoWidget, alertWidgetPropertySchema, calendarWidgetPropertySchema, carouselWidgetPropertySchema, catchUpWidgetPropertySchema, chartWidgetPropertySchema, containerWidgetPropertySchema, embedWidgetPropertySchema, gapValues, imageWidgetPropertySchema, layoutWidgetPropertySchema, listWidgetPropertySchema, mySiteWidgetPropertySchema, nestedWidgetPropertySchema, quickShareWidgetPropertySchema, recentActivityWidgetPropertySchema, spacerWidgetPropertySchema, tableWidgetPropertySchema, textWidgetPropertySchema, toDoWidgetPropertySchema, videoWidgetPropertySchema, widgetPropertySchemas };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-app/portal-widgets",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Widget components for the Fluid portal platform",
5
5
  "files": [
6
6
  "dist",
@@ -79,7 +79,7 @@
79
79
  "tailwind-merge": "^3.0.2",
80
80
  "tailwindcss": "^4.1.8",
81
81
  "tw-animate-css": "^1.4.0",
82
- "@fluid-app/portal-core": "0.1.16",
82
+ "@fluid-app/portal-core": "0.1.17",
83
83
  "@fluid-app/ui-primitives": "0.1.9"
84
84
  },
85
85
  "devDependencies": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"VideoWidget-D6C_jHOF.mjs","names":[],"sources":["../src/widgets/VideoWidget.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n getBorderRadiusField,\n getHeightField,\n type WidgetPropertySchema,\n} from \"@fluid-app/portal-core/registries\";\nimport type {\n BorderRadiusOptions,\n ShareableItem,\n} from \"@fluid-app/portal-core/types\";\nimport { MediaRenderer } from \"../components/MediaRenderer\";\n\ntype VideoWidgetProps = ComponentProps<\"div\"> & {\n src?: string;\n poster?: string;\n borderRadius?: BorderRadiusOptions;\n verticalSizing?: \"auto\" | \"fixed\";\n fixedHeight?: string;\n displayFit?: \"cover\" | \"contain\";\n focusPoint?: string;\n controls?: boolean;\n autoplay?: boolean;\n loop?: boolean;\n muted?: boolean;\n resource?: ShareableItem;\n useCustomUrl?: boolean;\n};\n\nexport function VideoWidget({\n src = \"\",\n poster = \"\",\n borderRadius = \"md\",\n verticalSizing = \"auto\",\n fixedHeight = \"200px\",\n displayFit = \"cover\",\n focusPoint,\n controls = true,\n autoplay = false,\n loop = false,\n muted = false,\n resource,\n useCustomUrl,\n}: VideoWidgetProps): React.JSX.Element {\n const effectiveSrc = useCustomUrl ? src : (resource?.videoUrl ?? src);\n const effectivePoster = useCustomUrl\n ? poster\n : (resource?.imageUrl ?? poster);\n\n const isFixed = verticalSizing === \"fixed\";\n\n return (\n <div\n className={`relative w-full overflow-hidden rounded-${borderRadius}`}\n style={isFixed ? { height: fixedHeight } : undefined}\n >\n <MediaRenderer\n mediaType=\"video\"\n src={effectiveSrc}\n poster={effectivePoster}\n objectFit={isFixed ? displayFit : undefined}\n focusPoint={isFixed ? focusPoint : undefined}\n controls={controls}\n autoplay={autoplay}\n loop={loop}\n muted={muted}\n />\n </div>\n );\n}\n\nexport const videoWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"VideoWidget\",\n displayName: \"Video\",\n tabsConfig: [\n { id: \"styling\", label: \"Styling\" },\n { id: \"behavior\", label: \"Behavior\" },\n ],\n fields: [\n // Styling tab - Content group\n {\n key: \"resource\",\n label: \"Select Video\",\n type: \"resource\",\n description: \"Browse and select a video\",\n allowedTypes: [\"Medium\"],\n tab: \"styling\",\n group: \"Content\",\n },\n {\n key: \"useCustomUrl\",\n label: \"Use Custom URL\",\n type: \"boolean\",\n description: \"Enter a custom video URL instead of selecting media\",\n defaultValue: false,\n tab: \"styling\",\n group: \"Content\",\n },\n {\n key: \"src\",\n label: \"Video URL\",\n type: \"text\",\n description: \"The source URL of the video\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Content\",\n requiresKeyToBeTrue: \"useCustomUrl\",\n },\n {\n key: \"poster\",\n label: \"Poster Image URL\",\n type: \"text\",\n description: \"Thumbnail image displayed before video plays\",\n defaultValue: \"\",\n tab: \"styling\",\n group: \"Content\",\n requiresKeyToBeTrue: \"useCustomUrl\",\n },\n\n // Styling tab - Design group\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the calendar container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"verticalSizing\",\n label: \"Vertical Sizing\",\n type: \"buttonGroup\",\n description: \"How the video height is determined\",\n options: [\n { label: \"Auto\", value: \"auto\" },\n { label: \"Fixed\", value: \"fixed\" },\n ],\n defaultValue: \"auto\",\n tab: \"styling\",\n group: \"Design\",\n },\n getHeightField({\n key: \"fixedHeight\",\n label: \"Height\",\n description: \"Fixed height of the video container\",\n min: 10,\n max: 1200,\n step: 10,\n defaultValue: \"200px\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n }),\n {\n key: \"displayFit\",\n label: \"Display Fit\",\n type: \"buttonGroup\",\n description: \"How the video fills its container\",\n options: [\n { label: \"Cover\", value: \"cover\" },\n { label: \"Contain\", value: \"contain\" },\n ],\n defaultValue: \"cover\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n },\n {\n key: \"focusPoint\",\n label: \"Focus Point\",\n type: \"contentPosition\",\n description: \"The focal point of the video within its container\",\n defaultValue: \"center\",\n tab: \"styling\",\n group: \"Design\",\n requiresKeyValue: { key: \"verticalSizing\", value: \"fixed\" },\n },\n\n // Behavior tab\n {\n key: \"controls\",\n label: \"Show Controls\",\n type: \"boolean\",\n description: \"Display video playback controls\",\n defaultValue: true,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"autoplay\",\n label: \"Autoplay\",\n type: \"boolean\",\n description: \"Automatically start playing the video\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"loop\",\n label: \"Loop\",\n type: \"boolean\",\n description: \"Repeat the video when it ends\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n {\n key: \"muted\",\n label: \"Muted\",\n type: \"boolean\",\n description: \"Start with audio muted\",\n defaultValue: false,\n tab: \"behavior\",\n group: \"Behavior\",\n },\n ],\n};\n"],"mappings":";;;;;;;;;AA6BA,SAAgB,YAAY,EAC1B,MAAM,IACN,SAAS,IACT,eAAe,MACf,iBAAiB,QACjB,cAAc,SACd,aAAa,SACb,YACA,WAAW,MACX,WAAW,OACX,OAAO,OACP,QAAQ,OACR,UACA,gBACsC;CACtC,MAAM,eAAe,eAAe,MAAO,UAAU,YAAY;CACjE,MAAM,kBAAkB,eACpB,SAC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