@wistia/ui 0.26.5-beta.dc708dcd.1bbd3a2 → 0.26.6-beta.195efffb.01ef308

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  /*
3
- * @license @wistia/ui v0.26.5-beta.dc708dcd.1bbd3a2
3
+ * @license @wistia/ui v0.26.6-beta.195efffb.01ef308
4
4
  *
5
5
  * Copyright (c) 2024-2026, Wistia, Inc. and its affiliates.
6
6
  *
@@ -10,7 +10,7 @@
10
10
  import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
11
11
  import { Children, cloneElement, createContext, forwardRef, isValidElement, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, useTransition } from "react";
12
12
  import { createGlobalStyle, css, keyframes, styled } from "styled-components";
13
- import { isArray, isBoolean, isEmptyString, isFunction, isNil, isNonEmptyArray, isNonEmptyString, isNotNil, isNotUndefined, isNumber, isRecord, isString, isUndefined } from "@wistia/type-guards";
13
+ import { isArray, isBoolean, isDate, isEmptyString, isFunction, isNil, isNonEmptyArray, isNonEmptyString, isNotNil, isNotUndefined, isNumber, isRecord, isString, isUndefined } from "@wistia/type-guards";
14
14
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
15
  import { Toaster, toast } from "sonner";
16
16
  import { isValid } from "date-fns/isValid";
@@ -519,13 +519,6 @@ const buildTimeDuration = (numberOfMilliseconds) => {
519
519
  };
520
520
  };
521
521
  //#endregion
522
- //#region src/helpers/dateTime/isDate.ts
523
- /**
524
- * @param {*} date - possible date value - unknown type
525
- * @returns {boolean} - whether it is a date object
526
- */
527
- const isDate = (date) => date instanceof Date;
528
- //#endregion
529
522
  //#region src/helpers/dateTime/isInvalidDate.ts
530
523
  /**
531
524
  * @param {*} date - a Date object - could be unknown though
@@ -13250,11 +13243,12 @@ const Meter = ({ segments, label, labelMeta, description, hideKey = false, max =
13250
13243
  const segmentsWithOffsets = segments.reduce((acc, segment) => {
13251
13244
  const offset = acc.reduce((sum, prev) => sum + prev.widthPercent, 0);
13252
13245
  const widthPercent = segment.value / max * 100;
13253
- return [...acc, {
13246
+ acc.push({
13254
13247
  ...segment,
13255
13248
  offset,
13256
13249
  widthPercent
13257
- }];
13250
+ });
13251
+ return acc;
13258
13252
  }, []);
13259
13253
  const keySegments = segmentsWithOffsets.filter((segment) => isNotNil(segment.label));
13260
13254
  const totalValue = segments.reduce((sum, segment) => sum + segment.value, 0);