@texturehq/edges 1.19.0 → 1.19.2
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/components.manifest.json +5 -5
- package/dist/form/index.cjs +1 -1
- package/dist/form/index.cjs.map +1 -1
- package/dist/form/index.js +1 -1
- package/dist/form/index.js.map +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -16
- package/dist/index.d.ts +47 -16
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/rhf/index.cjs.map +1 -1
- package/dist/rhf/index.js.map +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +1 -1
- package/dist/server.js.map +1 -1
- package/dist/styles.css +45 -8
- package/dist/utilities.manifest.json +2 -2
- package/package.json +174 -172
package/dist/index.d.cts
CHANGED
|
@@ -1807,8 +1807,12 @@ interface CopyToClipboardProps {
|
|
|
1807
1807
|
* Size of the copy button, defaults to "sm"
|
|
1808
1808
|
*/
|
|
1809
1809
|
size?: "sm" | "md";
|
|
1810
|
+
/**
|
|
1811
|
+
* Position of the copy icon relative to children, defaults to "right"
|
|
1812
|
+
*/
|
|
1813
|
+
iconPosition?: "left" | "right";
|
|
1810
1814
|
}
|
|
1811
|
-
declare function CopyToClipboard({ value, children, className, size }: CopyToClipboardProps): react_jsx_runtime.JSX.Element;
|
|
1815
|
+
declare function CopyToClipboard({ value, children, className, size, iconPosition, }: CopyToClipboardProps): react_jsx_runtime.JSX.Element;
|
|
1812
1816
|
|
|
1813
1817
|
interface AreaSeriesProps {
|
|
1814
1818
|
data: BaseDataPoint[];
|
|
@@ -1862,10 +1866,6 @@ declare const ChartAxis: {
|
|
|
1862
1866
|
Left: React__default.FC<AxisLeftProps>;
|
|
1863
1867
|
};
|
|
1864
1868
|
|
|
1865
|
-
interface LegendItem {
|
|
1866
|
-
category: string;
|
|
1867
|
-
fill: string;
|
|
1868
|
-
}
|
|
1869
1869
|
interface ChartBottomBarProps {
|
|
1870
1870
|
items: LegendItem[];
|
|
1871
1871
|
onExport: (type: ExportType) => void | Promise<void>;
|
|
@@ -1874,11 +1874,28 @@ interface ChartBottomBarProps {
|
|
|
1874
1874
|
isZoomed?: boolean;
|
|
1875
1875
|
onResetZoom?: () => void;
|
|
1876
1876
|
}
|
|
1877
|
+
interface LegendItem {
|
|
1878
|
+
category: string;
|
|
1879
|
+
fill: string;
|
|
1880
|
+
}
|
|
1881
|
+
declare const LegendItem: React__default.FC<{
|
|
1882
|
+
item: LegendItem;
|
|
1883
|
+
}>;
|
|
1877
1884
|
/**
|
|
1878
1885
|
* ChartBottomBar
|
|
1879
1886
|
*
|
|
1880
1887
|
* Chart footer component with legend and export functionality.
|
|
1881
1888
|
* Displays color-coded legend items and provides export options for CSV, SVG, and PNG formats.
|
|
1889
|
+
*
|
|
1890
|
+
* **Smart legend display:**
|
|
1891
|
+
* - Desktop (≥ 640px): Shows all legend items inline with wrapping
|
|
1892
|
+
* - Mobile (< 640px): Shows "Legend (N)" button that opens a tray with all items
|
|
1893
|
+
* - Legend and action buttons always stay on a single row for clean, consistent layout
|
|
1894
|
+
*
|
|
1895
|
+
* **Responsive behavior:**
|
|
1896
|
+
* - Mobile: No padding, legend in tray, button text hidden (icon-only)
|
|
1897
|
+
* - Desktop: Chart margin padding, inline legend, full button labels
|
|
1898
|
+
*
|
|
1882
1899
|
* Respects chart margins to align legend with Y-axis and export button with X-axis end.
|
|
1883
1900
|
*/
|
|
1884
1901
|
declare const ChartBottomBar: React__default.FC<ChartBottomBarProps>;
|
|
@@ -3065,8 +3082,10 @@ interface DeviceMetaDisplayProps {
|
|
|
3065
3082
|
manufacturer: string;
|
|
3066
3083
|
/** Device model name */
|
|
3067
3084
|
model: string;
|
|
3068
|
-
/** Device type for fallback icon */
|
|
3069
|
-
deviceType
|
|
3085
|
+
/** Device type for fallback icon (deprecated: use deviceTypeIconName instead) */
|
|
3086
|
+
deviceType?: DeviceType;
|
|
3087
|
+
/** Explicit device type icon name (preferred over deviceType) */
|
|
3088
|
+
deviceTypeIconName?: string;
|
|
3070
3089
|
/** URL to manufacturer logo (optional) */
|
|
3071
3090
|
logoUrl?: string;
|
|
3072
3091
|
/** Layout variant - stacked (vertical) or inline (horizontal) */
|
|
@@ -3130,7 +3149,7 @@ interface DeviceMetaDisplayProps {
|
|
|
3130
3149
|
* />
|
|
3131
3150
|
* ```
|
|
3132
3151
|
*/
|
|
3133
|
-
declare function DeviceMetaDisplay({ manufacturer, model, deviceType, logoUrl, layout, size, href, LinkComponent, linkVariant, showDeviceTypeIcon, showLogo, emphasis, isLoading, className, }: DeviceMetaDisplayProps): react_jsx_runtime.JSX.Element;
|
|
3152
|
+
declare function DeviceMetaDisplay({ manufacturer, model, deviceType, deviceTypeIconName, logoUrl, layout, size, href, LinkComponent, linkVariant, showDeviceTypeIcon, showLogo, emphasis, isLoading, className, }: DeviceMetaDisplayProps): react_jsx_runtime.JSX.Element;
|
|
3134
3153
|
|
|
3135
3154
|
interface DeviceStateBadgeProps extends Omit<BadgeProps, "variant" | "children"> {
|
|
3136
3155
|
/** The device state to display */
|
|
@@ -3212,8 +3231,10 @@ interface DeviceStateWithMetricProps extends Pick<DeviceStateBadgeProps, "state"
|
|
|
3212
3231
|
declare function DeviceStateWithMetric({ state, stateLabel, metric, metricFormatter, secondaryState, layout, isLoading, size, shape, icon, fixedWidth, className, }: DeviceStateWithMetricProps): react_jsx_runtime.JSX.Element;
|
|
3213
3232
|
|
|
3214
3233
|
interface DeviceTypeIconProps {
|
|
3215
|
-
/** The device type to display */
|
|
3216
|
-
deviceType
|
|
3234
|
+
/** The device type to display (deprecated: use iconName instead) */
|
|
3235
|
+
deviceType?: DeviceType;
|
|
3236
|
+
/** Explicit icon name to display (preferred over deviceType) */
|
|
3237
|
+
iconName?: IconName$2;
|
|
3217
3238
|
/** Size of the icon (preset or custom pixel size) */
|
|
3218
3239
|
size?: number | "sm" | "md" | "lg" | "xl";
|
|
3219
3240
|
/** Show label below the icon */
|
|
@@ -3225,20 +3246,26 @@ interface DeviceTypeIconProps {
|
|
|
3225
3246
|
* DeviceTypeIcon
|
|
3226
3247
|
*
|
|
3227
3248
|
* Displays a consistent icon for device types across the platform.
|
|
3228
|
-
*
|
|
3249
|
+
*
|
|
3250
|
+
* **Preferred usage:** Pass `iconName` explicitly (from device-config package)
|
|
3251
|
+
* **Legacy usage:** Pass `deviceType` to use built-in icon mapping (deprecated)
|
|
3229
3252
|
*
|
|
3230
3253
|
* @example
|
|
3231
3254
|
* ```tsx
|
|
3255
|
+
* // Preferred: Explicit icon from device-config
|
|
3256
|
+
* import { getDeviceTypeDisplay } from "@texturehq/device-config";
|
|
3257
|
+
* const display = getDeviceTypeDisplay("battery");
|
|
3258
|
+
* <DeviceTypeIcon iconName={display.icon} size="md" />
|
|
3259
|
+
*
|
|
3260
|
+
* // Legacy: Built-in mapping (deprecated)
|
|
3232
3261
|
* <DeviceTypeIcon deviceType="battery" size="md" />
|
|
3233
|
-
* <DeviceTypeIcon deviceType="thermostat" showLabel />
|
|
3234
|
-
* <DeviceTypeIcon deviceType="charger" size={32} />
|
|
3235
3262
|
* ```
|
|
3236
3263
|
*/
|
|
3237
|
-
declare function DeviceTypeIcon({ deviceType, size, showLabel, className, }: DeviceTypeIconProps): react_jsx_runtime.JSX.Element;
|
|
3264
|
+
declare function DeviceTypeIcon({ deviceType, iconName, size, showLabel, className, }: DeviceTypeIconProps): react_jsx_runtime.JSX.Element;
|
|
3238
3265
|
|
|
3239
3266
|
type BaseDialogHeaderProps = {
|
|
3240
3267
|
title?: string;
|
|
3241
|
-
onClose
|
|
3268
|
+
onClose?: () => void;
|
|
3242
3269
|
hideCloseIcon?: boolean;
|
|
3243
3270
|
titleAlign?: "left" | "center";
|
|
3244
3271
|
headerContent?: React__default.ReactNode;
|
|
@@ -4612,6 +4639,8 @@ interface SiteContactCardProps {
|
|
|
4612
4639
|
className?: string;
|
|
4613
4640
|
/** Additional classes for the card content (for padding control, etc.) */
|
|
4614
4641
|
contentClassName?: string;
|
|
4642
|
+
/** Whether the card should fill the full height of its container */
|
|
4643
|
+
fullHeight?: boolean;
|
|
4615
4644
|
}
|
|
4616
4645
|
/**
|
|
4617
4646
|
* SiteContactCard
|
|
@@ -4642,7 +4671,7 @@ interface SiteContactCardProps {
|
|
|
4642
4671
|
* />
|
|
4643
4672
|
* ```
|
|
4644
4673
|
*/
|
|
4645
|
-
declare function SiteContactCard({ site, contact, LinkComponent, variant, showMap, mapHeight, mapboxAccessToken, showEmail, showPhone, isLoading, className, contentClassName, }: SiteContactCardProps): react_jsx_runtime.JSX.Element;
|
|
4674
|
+
declare function SiteContactCard({ site, contact, LinkComponent, variant, showMap, mapHeight, mapboxAccessToken, showEmail, showPhone, isLoading, className, contentClassName, fullHeight, }: SiteContactCardProps): react_jsx_runtime.JSX.Element;
|
|
4646
4675
|
|
|
4647
4676
|
interface SiteMetaDisplayProps {
|
|
4648
4677
|
/** Street address (combined street lines) */
|
|
@@ -4857,6 +4886,8 @@ interface StatItem {
|
|
|
4857
4886
|
thresholds?: StatThreshold[];
|
|
4858
4887
|
/** Enable copy to clipboard */
|
|
4859
4888
|
copyable?: boolean | ((value: StatValue) => string);
|
|
4889
|
+
/** Position of the copy icon when copyable is enabled, defaults to "left" */
|
|
4890
|
+
copyIconPosition?: "left" | "right";
|
|
4860
4891
|
/** Optional link URL */
|
|
4861
4892
|
href?: string;
|
|
4862
4893
|
/** Click handler */
|
package/dist/index.d.ts
CHANGED
|
@@ -1807,8 +1807,12 @@ interface CopyToClipboardProps {
|
|
|
1807
1807
|
* Size of the copy button, defaults to "sm"
|
|
1808
1808
|
*/
|
|
1809
1809
|
size?: "sm" | "md";
|
|
1810
|
+
/**
|
|
1811
|
+
* Position of the copy icon relative to children, defaults to "right"
|
|
1812
|
+
*/
|
|
1813
|
+
iconPosition?: "left" | "right";
|
|
1810
1814
|
}
|
|
1811
|
-
declare function CopyToClipboard({ value, children, className, size }: CopyToClipboardProps): react_jsx_runtime.JSX.Element;
|
|
1815
|
+
declare function CopyToClipboard({ value, children, className, size, iconPosition, }: CopyToClipboardProps): react_jsx_runtime.JSX.Element;
|
|
1812
1816
|
|
|
1813
1817
|
interface AreaSeriesProps {
|
|
1814
1818
|
data: BaseDataPoint[];
|
|
@@ -1862,10 +1866,6 @@ declare const ChartAxis: {
|
|
|
1862
1866
|
Left: React__default.FC<AxisLeftProps>;
|
|
1863
1867
|
};
|
|
1864
1868
|
|
|
1865
|
-
interface LegendItem {
|
|
1866
|
-
category: string;
|
|
1867
|
-
fill: string;
|
|
1868
|
-
}
|
|
1869
1869
|
interface ChartBottomBarProps {
|
|
1870
1870
|
items: LegendItem[];
|
|
1871
1871
|
onExport: (type: ExportType) => void | Promise<void>;
|
|
@@ -1874,11 +1874,28 @@ interface ChartBottomBarProps {
|
|
|
1874
1874
|
isZoomed?: boolean;
|
|
1875
1875
|
onResetZoom?: () => void;
|
|
1876
1876
|
}
|
|
1877
|
+
interface LegendItem {
|
|
1878
|
+
category: string;
|
|
1879
|
+
fill: string;
|
|
1880
|
+
}
|
|
1881
|
+
declare const LegendItem: React__default.FC<{
|
|
1882
|
+
item: LegendItem;
|
|
1883
|
+
}>;
|
|
1877
1884
|
/**
|
|
1878
1885
|
* ChartBottomBar
|
|
1879
1886
|
*
|
|
1880
1887
|
* Chart footer component with legend and export functionality.
|
|
1881
1888
|
* Displays color-coded legend items and provides export options for CSV, SVG, and PNG formats.
|
|
1889
|
+
*
|
|
1890
|
+
* **Smart legend display:**
|
|
1891
|
+
* - Desktop (≥ 640px): Shows all legend items inline with wrapping
|
|
1892
|
+
* - Mobile (< 640px): Shows "Legend (N)" button that opens a tray with all items
|
|
1893
|
+
* - Legend and action buttons always stay on a single row for clean, consistent layout
|
|
1894
|
+
*
|
|
1895
|
+
* **Responsive behavior:**
|
|
1896
|
+
* - Mobile: No padding, legend in tray, button text hidden (icon-only)
|
|
1897
|
+
* - Desktop: Chart margin padding, inline legend, full button labels
|
|
1898
|
+
*
|
|
1882
1899
|
* Respects chart margins to align legend with Y-axis and export button with X-axis end.
|
|
1883
1900
|
*/
|
|
1884
1901
|
declare const ChartBottomBar: React__default.FC<ChartBottomBarProps>;
|
|
@@ -3065,8 +3082,10 @@ interface DeviceMetaDisplayProps {
|
|
|
3065
3082
|
manufacturer: string;
|
|
3066
3083
|
/** Device model name */
|
|
3067
3084
|
model: string;
|
|
3068
|
-
/** Device type for fallback icon */
|
|
3069
|
-
deviceType
|
|
3085
|
+
/** Device type for fallback icon (deprecated: use deviceTypeIconName instead) */
|
|
3086
|
+
deviceType?: DeviceType;
|
|
3087
|
+
/** Explicit device type icon name (preferred over deviceType) */
|
|
3088
|
+
deviceTypeIconName?: string;
|
|
3070
3089
|
/** URL to manufacturer logo (optional) */
|
|
3071
3090
|
logoUrl?: string;
|
|
3072
3091
|
/** Layout variant - stacked (vertical) or inline (horizontal) */
|
|
@@ -3130,7 +3149,7 @@ interface DeviceMetaDisplayProps {
|
|
|
3130
3149
|
* />
|
|
3131
3150
|
* ```
|
|
3132
3151
|
*/
|
|
3133
|
-
declare function DeviceMetaDisplay({ manufacturer, model, deviceType, logoUrl, layout, size, href, LinkComponent, linkVariant, showDeviceTypeIcon, showLogo, emphasis, isLoading, className, }: DeviceMetaDisplayProps): react_jsx_runtime.JSX.Element;
|
|
3152
|
+
declare function DeviceMetaDisplay({ manufacturer, model, deviceType, deviceTypeIconName, logoUrl, layout, size, href, LinkComponent, linkVariant, showDeviceTypeIcon, showLogo, emphasis, isLoading, className, }: DeviceMetaDisplayProps): react_jsx_runtime.JSX.Element;
|
|
3134
3153
|
|
|
3135
3154
|
interface DeviceStateBadgeProps extends Omit<BadgeProps, "variant" | "children"> {
|
|
3136
3155
|
/** The device state to display */
|
|
@@ -3212,8 +3231,10 @@ interface DeviceStateWithMetricProps extends Pick<DeviceStateBadgeProps, "state"
|
|
|
3212
3231
|
declare function DeviceStateWithMetric({ state, stateLabel, metric, metricFormatter, secondaryState, layout, isLoading, size, shape, icon, fixedWidth, className, }: DeviceStateWithMetricProps): react_jsx_runtime.JSX.Element;
|
|
3213
3232
|
|
|
3214
3233
|
interface DeviceTypeIconProps {
|
|
3215
|
-
/** The device type to display */
|
|
3216
|
-
deviceType
|
|
3234
|
+
/** The device type to display (deprecated: use iconName instead) */
|
|
3235
|
+
deviceType?: DeviceType;
|
|
3236
|
+
/** Explicit icon name to display (preferred over deviceType) */
|
|
3237
|
+
iconName?: IconName$2;
|
|
3217
3238
|
/** Size of the icon (preset or custom pixel size) */
|
|
3218
3239
|
size?: number | "sm" | "md" | "lg" | "xl";
|
|
3219
3240
|
/** Show label below the icon */
|
|
@@ -3225,20 +3246,26 @@ interface DeviceTypeIconProps {
|
|
|
3225
3246
|
* DeviceTypeIcon
|
|
3226
3247
|
*
|
|
3227
3248
|
* Displays a consistent icon for device types across the platform.
|
|
3228
|
-
*
|
|
3249
|
+
*
|
|
3250
|
+
* **Preferred usage:** Pass `iconName` explicitly (from device-config package)
|
|
3251
|
+
* **Legacy usage:** Pass `deviceType` to use built-in icon mapping (deprecated)
|
|
3229
3252
|
*
|
|
3230
3253
|
* @example
|
|
3231
3254
|
* ```tsx
|
|
3255
|
+
* // Preferred: Explicit icon from device-config
|
|
3256
|
+
* import { getDeviceTypeDisplay } from "@texturehq/device-config";
|
|
3257
|
+
* const display = getDeviceTypeDisplay("battery");
|
|
3258
|
+
* <DeviceTypeIcon iconName={display.icon} size="md" />
|
|
3259
|
+
*
|
|
3260
|
+
* // Legacy: Built-in mapping (deprecated)
|
|
3232
3261
|
* <DeviceTypeIcon deviceType="battery" size="md" />
|
|
3233
|
-
* <DeviceTypeIcon deviceType="thermostat" showLabel />
|
|
3234
|
-
* <DeviceTypeIcon deviceType="charger" size={32} />
|
|
3235
3262
|
* ```
|
|
3236
3263
|
*/
|
|
3237
|
-
declare function DeviceTypeIcon({ deviceType, size, showLabel, className, }: DeviceTypeIconProps): react_jsx_runtime.JSX.Element;
|
|
3264
|
+
declare function DeviceTypeIcon({ deviceType, iconName, size, showLabel, className, }: DeviceTypeIconProps): react_jsx_runtime.JSX.Element;
|
|
3238
3265
|
|
|
3239
3266
|
type BaseDialogHeaderProps = {
|
|
3240
3267
|
title?: string;
|
|
3241
|
-
onClose
|
|
3268
|
+
onClose?: () => void;
|
|
3242
3269
|
hideCloseIcon?: boolean;
|
|
3243
3270
|
titleAlign?: "left" | "center";
|
|
3244
3271
|
headerContent?: React__default.ReactNode;
|
|
@@ -4612,6 +4639,8 @@ interface SiteContactCardProps {
|
|
|
4612
4639
|
className?: string;
|
|
4613
4640
|
/** Additional classes for the card content (for padding control, etc.) */
|
|
4614
4641
|
contentClassName?: string;
|
|
4642
|
+
/** Whether the card should fill the full height of its container */
|
|
4643
|
+
fullHeight?: boolean;
|
|
4615
4644
|
}
|
|
4616
4645
|
/**
|
|
4617
4646
|
* SiteContactCard
|
|
@@ -4642,7 +4671,7 @@ interface SiteContactCardProps {
|
|
|
4642
4671
|
* />
|
|
4643
4672
|
* ```
|
|
4644
4673
|
*/
|
|
4645
|
-
declare function SiteContactCard({ site, contact, LinkComponent, variant, showMap, mapHeight, mapboxAccessToken, showEmail, showPhone, isLoading, className, contentClassName, }: SiteContactCardProps): react_jsx_runtime.JSX.Element;
|
|
4674
|
+
declare function SiteContactCard({ site, contact, LinkComponent, variant, showMap, mapHeight, mapboxAccessToken, showEmail, showPhone, isLoading, className, contentClassName, fullHeight, }: SiteContactCardProps): react_jsx_runtime.JSX.Element;
|
|
4646
4675
|
|
|
4647
4676
|
interface SiteMetaDisplayProps {
|
|
4648
4677
|
/** Street address (combined street lines) */
|
|
@@ -4857,6 +4886,8 @@ interface StatItem {
|
|
|
4857
4886
|
thresholds?: StatThreshold[];
|
|
4858
4887
|
/** Enable copy to clipboard */
|
|
4859
4888
|
copyable?: boolean | ((value: StatValue) => string);
|
|
4889
|
+
/** Position of the copy icon when copyable is enabled, defaults to "left" */
|
|
4890
|
+
copyIconPosition?: "left" | "right";
|
|
4860
4891
|
/** Optional link URL */
|
|
4861
4892
|
href?: string;
|
|
4862
4893
|
/** Click handler */
|