Type definitions for the @fluid-app/web-widgets package.
Overview
This package contains TypeScript interfaces and type definitions extracted from the @fluid-app/web-widgets package. It allows other packages to use these type definitions without having to install the entire Web Components widgets package.
Usage
import type {
FluidWindow,
WebComponentOptions,
WidgetInfo,
} from "@fluid-app/web-widgets-types";
// Use the types in your code
const widgetDefinition: WidgetInfo = {
dirName: "cart-widget",
componentName: "CartWidget",
tagName: "fluid-cart-widget",
propsJsonPath: "./generated/cart-widget-props.js",
};
Types Included
WidgetInfo: Configuration for web component widgets
FluidWindow: Type definitions for window object extensions
WebComponentOptions: Options for web component creation
Re-exports of types from @fluid-app/react-widgets-types: CartWidgetProps, BannerWidgetProps, LeadCaptureWidgetProps