autoql-fe-utils 1.11.9 → 1.11.10

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.d.mts CHANGED
@@ -2232,6 +2232,22 @@ declare const getPieChartData: ({ data, numberColumnIndex, legendLabels }: {
2232
2232
  pieChartFn: any;
2233
2233
  legendScale: any;
2234
2234
  };
2235
+ /** Retry measuring element size until stable (browser-only, returns current rect in tests) */
2236
+ declare const waitForStableRect: (el: Element | null, opts?: {
2237
+ retries?: number;
2238
+ stableThreshold?: number;
2239
+ delayMs?: number;
2240
+ }) => Promise<{
2241
+ width: number;
2242
+ height: number;
2243
+ }>;
2244
+ /** Observe container resize/visibility changes and re-render; waits for stable size on first render (browser-only) */
2245
+ declare const observeAndRender: (container: Element | null, renderFn: (rect: {
2246
+ width: number;
2247
+ height: number;
2248
+ }) => void | Promise<void>, opts?: {
2249
+ debounceMs?: number;
2250
+ }) => () => void;
2235
2251
  declare const getDefaultBucketConfig: (data: any, bucketSize: any) => {
2236
2252
  bucketSize: any;
2237
2253
  minBucketSize: any;
@@ -2981,4 +2997,4 @@ declare function color(): {
2981
2997
  on(): any;
2982
2998
  };
2983
2999
 
2984
- export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_COLUMN_NAME, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getProtectedRanges, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
3000
+ export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_COLUMN_NAME, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getProtectedRanges, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, observeAndRender, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression, waitForStableRect };
package/dist/index.d.ts CHANGED
@@ -2232,6 +2232,22 @@ declare const getPieChartData: ({ data, numberColumnIndex, legendLabels }: {
2232
2232
  pieChartFn: any;
2233
2233
  legendScale: any;
2234
2234
  };
2235
+ /** Retry measuring element size until stable (browser-only, returns current rect in tests) */
2236
+ declare const waitForStableRect: (el: Element | null, opts?: {
2237
+ retries?: number;
2238
+ stableThreshold?: number;
2239
+ delayMs?: number;
2240
+ }) => Promise<{
2241
+ width: number;
2242
+ height: number;
2243
+ }>;
2244
+ /** Observe container resize/visibility changes and re-render; waits for stable size on first render (browser-only) */
2245
+ declare const observeAndRender: (container: Element | null, renderFn: (rect: {
2246
+ width: number;
2247
+ height: number;
2248
+ }) => void | Promise<void>, opts?: {
2249
+ debounceMs?: number;
2250
+ }) => () => void;
2235
2251
  declare const getDefaultBucketConfig: (data: any, bucketSize: any) => {
2236
2252
  bucketSize: any;
2237
2253
  minBucketSize: any;
@@ -2981,4 +2997,4 @@ declare function color(): {
2981
2997
  on(): any;
2982
2998
  };
2983
2999
 
2984
- export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_COLUMN_NAME, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getProtectedRanges, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
3000
+ export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_COLUMN_NAME, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getProtectedRanges, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, observeAndRender, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression, waitForStableRect };
@@ -2053,36 +2053,54 @@
2053
2053
  elementBBoxesCache = /* @__PURE__ */ new WeakMap();
2054
2054
  }
2055
2055
  function getElementBBoxes(element) {
2056
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
2056
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
2057
2057
  if (!element) return { bbox: { x: 0, y: 0, width: 0, height: 0 }, clientRect: {} };
2058
+ const tagName = (_b = (_a = element == null ? void 0 : element.tagName) == null ? void 0 : _a.toLowerCase) == null ? void 0 : _b.call(_a);
2059
+ const shouldBypassCache = tagName === "text" || tagName === "tspan";
2058
2060
  try {
2059
- const cached = elementBBoxesCache.get(element);
2060
- const now = Date.now();
2061
- if (cached && now - cached.ts < CACHE_TTL) return { bbox: cached.bbox, clientRect: cached.clientRect };
2061
+ if (!shouldBypassCache) {
2062
+ const cached = elementBBoxesCache.get(element);
2063
+ const now = Date.now();
2064
+ if (cached && now - cached.ts < CACHE_TTL) return { bbox: cached.bbox, clientRect: cached.clientRect };
2065
+ }
2062
2066
  } catch (e) {
2063
2067
  }
2064
2068
  const bbox = getBBoxSafe(element) || { x: 0, y: 0, width: 0, height: 0 };
2065
2069
  let clientRect;
2070
+ let clientRectsLength = -1;
2066
2071
  try {
2067
2072
  if (element && typeof element.getBoundingClientRect === "function")
2068
2073
  clientRect = element.getBoundingClientRect();
2069
2074
  } catch (e) {
2070
2075
  }
2076
+ try {
2077
+ if (element && typeof element.getClientRects === "function")
2078
+ clientRectsLength = element.getClientRects().length;
2079
+ } catch (e) {
2080
+ }
2071
2081
  if (!clientRect) {
2072
2082
  clientRect = {
2073
- x: (_b = (_a = bbox.x) != null ? _a : bbox.left) != null ? _b : 0,
2074
- y: (_d = (_c = bbox.y) != null ? _c : bbox.top) != null ? _d : 0,
2075
- width: (_e = bbox.width) != null ? _e : 0,
2076
- height: (_f = bbox.height) != null ? _f : 0,
2077
- left: (_h = (_g = bbox.x) != null ? _g : bbox.left) != null ? _h : 0,
2078
- top: (_j = (_i = bbox.y) != null ? _i : bbox.top) != null ? _j : 0,
2079
- right: ((_l = (_k = bbox.x) != null ? _k : bbox.left) != null ? _l : 0) + ((_m = bbox.width) != null ? _m : 0),
2080
- bottom: ((_o = (_n = bbox.y) != null ? _n : bbox.top) != null ? _o : 0) + ((_p = bbox.height) != null ? _p : 0)
2083
+ x: (_d = (_c = bbox.x) != null ? _c : bbox.left) != null ? _d : 0,
2084
+ y: (_f = (_e = bbox.y) != null ? _e : bbox.top) != null ? _f : 0,
2085
+ width: (_g = bbox.width) != null ? _g : 0,
2086
+ height: (_h = bbox.height) != null ? _h : 0,
2087
+ left: (_j = (_i = bbox.x) != null ? _i : bbox.left) != null ? _j : 0,
2088
+ top: (_l = (_k = bbox.y) != null ? _k : bbox.top) != null ? _l : 0,
2089
+ right: ((_n = (_m = bbox.x) != null ? _m : bbox.left) != null ? _n : 0) + ((_o = bbox.width) != null ? _o : 0),
2090
+ bottom: ((_q = (_p = bbox.y) != null ? _p : bbox.top) != null ? _q : 0) + ((_r = bbox.height) != null ? _r : 0)
2081
2091
  };
2082
2092
  }
2083
- try {
2084
- elementBBoxesCache.set(element, { bbox, clientRect, ts: Date.now() });
2085
- } catch (e) {
2093
+ const isDisconnected = typeof element.isConnected === "boolean" ? !element.isConnected : false;
2094
+ const bboxW = (_s = bbox == null ? void 0 : bbox.width) != null ? _s : 0;
2095
+ const bboxH = (_t = bbox == null ? void 0 : bbox.height) != null ? _t : 0;
2096
+ const rectW = (_u = clientRect == null ? void 0 : clientRect.width) != null ? _u : 0;
2097
+ const rectH = (_v = clientRect == null ? void 0 : clientRect.height) != null ? _v : 0;
2098
+ const isHidden = clientRectsLength === 0 && rectW === 0 && rectH === 0 && bboxW === 0 && bboxH === 0;
2099
+ if (!shouldBypassCache && !isDisconnected && !isHidden) {
2100
+ try {
2101
+ elementBBoxesCache.set(element, { bbox, clientRect, ts: Date.now() });
2102
+ } catch (e) {
2103
+ }
2086
2104
  }
2087
2105
  return { bbox, clientRect };
2088
2106
  }
@@ -2099,6 +2117,20 @@
2099
2117
  } catch (e) {
2100
2118
  }
2101
2119
  });
2120
+ window.addEventListener("pageshow", () => {
2121
+ try {
2122
+ clearElementBBoxesCache();
2123
+ } catch (e) {
2124
+ }
2125
+ });
2126
+ }
2127
+ if (typeof document !== "undefined" && typeof document.addEventListener === "function") {
2128
+ document.addEventListener("visibilitychange", () => {
2129
+ try {
2130
+ clearElementBBoxesCache();
2131
+ } catch (e) {
2132
+ }
2133
+ });
2102
2134
  }
2103
2135
  }
2104
2136
  });
@@ -24633,6 +24665,9 @@
24633
24665
  maxValue = 0;
24634
24666
  }
24635
24667
  }
24668
+ if (maxValue >= 0 && minValue >= 0) {
24669
+ minValue = 0;
24670
+ }
24636
24671
  return {
24637
24672
  maxValue,
24638
24673
  minValue,
@@ -24688,13 +24723,11 @@
24688
24723
  let newMinValue = minValue;
24689
24724
  let newMaxValue = maxValue;
24690
24725
  const disableScale = isScaled && shouldDisableChartScale(minValue, maxValue);
24691
- if (!isScaled || disableScale) {
24692
- if (maxValue >= 0 && minValue >= 0) {
24693
- newMinValue = 0;
24694
- } else if (maxValue < 0 && minValue < 0) {
24695
- newMaxValue = 0;
24696
- }
24697
- } else if (!isScaled && getChartScaleRatio(minValue, maxValue) < MIN_SCALE_RATIO) {
24726
+ if (maxValue >= 0 && minValue >= 0) {
24727
+ newMinValue = 0;
24728
+ } else if (maxValue < 0 && minValue < 0) {
24729
+ newMaxValue = 0;
24730
+ } else if (isScaled && getChartScaleRatio(minValue, maxValue) < MIN_SCALE_RATIO) {
24698
24731
  const range2 = maxValue - minValue;
24699
24732
  newMinValue = minValue - range2 * 0.05;
24700
24733
  newMaxValue = maxValue + range2 * 0.05;
@@ -25178,41 +25211,48 @@
25178
25211
  originalColumns,
25179
25212
  isDataAggregated
25180
25213
  }) => {
25181
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
25214
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
25182
25215
  let domainFinal = domain;
25183
25216
  if (!domain) {
25184
25217
  let min2 = (_a = minValue != null ? minValue : tickValues == null ? void 0 : tickValues[0]) != null ? _a : 0;
25185
25218
  let max2 = (_b = maxValue != null ? maxValue : tickValues == null ? void 0 : tickValues[(tickValues == null ? void 0 : tickValues.length) - 1]) != null ? _b : 0;
25186
25219
  if (adjustRange) {
25187
25220
  const { newMinValue, newMaxValue } = adjustMinAndMaxForScaleRatio(min2, max2, isScaled);
25188
- if (newMinValue) min2 = newMinValue;
25189
- if (newMaxValue) max2 = newMaxValue;
25221
+ if (newMinValue !== void 0) min2 = newMinValue;
25222
+ if (newMaxValue !== void 0) max2 = newMaxValue;
25190
25223
  }
25191
25224
  domainFinal = [min2, max2];
25192
25225
  }
25193
25226
  const config = getDataFormatting(dataFormatting);
25194
25227
  const colIndices = columnIndices != null ? columnIndices : [columnIndex];
25195
25228
  const scaleRange = range2 != null ? range2 : getRangeForAxis({ axis: axis2, height, width });
25196
- const axisColumns = (_c = colIndices == null ? void 0 : colIndices.map((index) => columns == null ? void 0 : columns[index])) != null ? _c : [];
25229
+ let finalScaleRange = scaleRange;
25230
+ if (typeof window !== "undefined") {
25231
+ const delta = Math.abs(((_c = scaleRange == null ? void 0 : scaleRange[1]) != null ? _c : 0) - ((_d = scaleRange == null ? void 0 : scaleRange[0]) != null ? _d : 0));
25232
+ if (delta < 30) {
25233
+ finalScaleRange = axis2 === "x" ? [(_e = scaleRange == null ? void 0 : scaleRange[0]) != null ? _e : 0, ((_f = scaleRange == null ? void 0 : scaleRange[0]) != null ? _f : 0) + 30] : [((_g = scaleRange == null ? void 0 : scaleRange[1]) != null ? _g : 0) + 30, (_h = scaleRange == null ? void 0 : scaleRange[1]) != null ? _h : 0];
25234
+ }
25235
+ }
25236
+ const axisColumns = (_i = colIndices == null ? void 0 : colIndices.map((index) => columns == null ? void 0 : columns[index])) != null ? _i : [];
25197
25237
  const axisTitle = title != null ? title : getLinearAxisTitle({
25198
25238
  numberColumns: axisColumns,
25199
25239
  aggregated,
25200
25240
  isDataAggregated
25201
25241
  });
25202
- const disableScale = isScaled && shouldDisableChartScale((_d = domainFinal == null ? void 0 : domainFinal[0]) != null ? _d : 0, (_e = domainFinal == null ? void 0 : domainFinal[1]) != null ? _e : 0);
25203
- const scale = linear2().domain(domainFinal).range(scaleRange);
25242
+ const disableScale = isScaled && shouldDisableChartScale((_j = domainFinal == null ? void 0 : domainFinal[0]) != null ? _j : 0, (_k = domainFinal == null ? void 0 : domainFinal[1]) != null ? _k : 0);
25243
+ const scale = linear2().domain(domainFinal).range(finalScaleRange);
25204
25244
  scale.disableAutoScale = disableAutoScale != null ? disableAutoScale : disableScale;
25205
- scale.minValue = (_f = domainFinal == null ? void 0 : domainFinal[0]) != null ? _f : 0;
25206
- scale.maxValue = (_g = domainFinal == null ? void 0 : domainFinal[1]) != null ? _g : 0;
25245
+ scale.minValue = (_l = domainFinal == null ? void 0 : domainFinal[0]) != null ? _l : 0;
25246
+ scale.maxValue = (_m = domainFinal == null ? void 0 : domainFinal[1]) != null ? _m : 0;
25207
25247
  scale.columnIndex = columnIndex;
25208
25248
  scale.column = columns == null ? void 0 : columns[columnIndex];
25209
25249
  scale.fields = axisColumns;
25210
- scale.allFields = aggregated ? (_h = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _h.allNumberColumnIndices : (_i = getNumberColumnIndices(columns)) == null ? void 0 : _i.allNumberColumnIndices;
25250
+ scale.allFields = aggregated ? (_n = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _n.allNumberColumnIndices : (_o = getNumberColumnIndices(columns)) == null ? void 0 : _o.allNumberColumnIndices;
25211
25251
  scale.dataFormatting = config;
25212
25252
  scale.hasDropdown = shouldShowAxisSelector({
25213
25253
  scaleType: "LINEAR",
25214
25254
  enableAxisDropdown: hasDropdown != null ? hasDropdown : enableAxisDropdown,
25215
- numAllFields: (_k = (_j = scale.allFields) == null ? void 0 : _j.length) != null ? _k : 0
25255
+ numAllFields: (_q = (_p = scale.allFields) == null ? void 0 : _p.length) != null ? _q : 0
25216
25256
  });
25217
25257
  scale.stacked = !!stacked;
25218
25258
  scale.type = "LINEAR";
@@ -25261,7 +25301,7 @@
25261
25301
  colorScales,
25262
25302
  isDataAggregated
25263
25303
  }) => {
25264
- var _a, _b;
25304
+ var _a, _b, _c, _d, _e, _f, _g, _h;
25265
25305
  const commonParams = {
25266
25306
  stacked,
25267
25307
  isScaled,
@@ -25297,6 +25337,17 @@
25297
25337
  ...scaleColumnConfig,
25298
25338
  ...commonParams
25299
25339
  });
25340
+ try {
25341
+ console.debug("[chartHelpers] tempScale1", {
25342
+ range: (_a = tempScale1.range) == null ? void 0 : _a.call(tempScale1),
25343
+ domain: (_b = tempScale1.domain) == null ? void 0 : _b.call(tempScale1),
25344
+ minValue: tempScale1.minValue,
25345
+ maxValue: tempScale1.maxValue,
25346
+ height,
25347
+ width
25348
+ });
25349
+ } catch (e) {
25350
+ }
25300
25351
  if (!hasSecondAxis) {
25301
25352
  return {
25302
25353
  scale: tempScale1
@@ -25317,7 +25368,7 @@
25317
25368
  maxValue: maxValue2,
25318
25369
  disableAutoScale: disableAutoScale != null ? disableAutoScale : disableScale2,
25319
25370
  range: tempScale1.range(),
25320
- numTicks: (_b = (_a = tempScale1.tickLabels) == null ? void 0 : _a.length) != null ? _b : void 0,
25371
+ numTicks: (_d = (_c = tempScale1.tickLabels) == null ? void 0 : _c.length) != null ? _d : void 0,
25321
25372
  ...scaleColumnConfig2,
25322
25373
  ...commonParams
25323
25374
  });
@@ -25358,6 +25409,23 @@
25358
25409
  });
25359
25410
  scale.secondScale = scale2;
25360
25411
  scale2.secondScale = scale;
25412
+ try {
25413
+ console.debug("[chartHelpers] pairedScales", {
25414
+ scale1: {
25415
+ range: (_e = scale.range) == null ? void 0 : _e.call(scale),
25416
+ domain: (_f = scale.domain) == null ? void 0 : _f.call(scale),
25417
+ minValue: scale.minValue,
25418
+ maxValue: scale.maxValue
25419
+ },
25420
+ scale2: {
25421
+ range: (_g = scale2.range) == null ? void 0 : _g.call(scale2),
25422
+ domain: (_h = scale2.domain) == null ? void 0 : _h.call(scale2),
25423
+ minValue: scale2.minValue,
25424
+ maxValue: scale2.maxValue
25425
+ }
25426
+ });
25427
+ } catch (e) {
25428
+ }
25361
25429
  return { scale, scale2 };
25362
25430
  };
25363
25431
  var doesElementOverflowContainer = (element, container) => {
@@ -25874,6 +25942,66 @@
25874
25942
  const legendScale = getLegendScale(legendLabels);
25875
25943
  return { pieChartFn, legendScale };
25876
25944
  };
25945
+ var waitForStableRect = async (el, opts = {}) => {
25946
+ var _a, _b;
25947
+ const { retries = 10, stableThreshold = 3, delayMs = 80 } = opts;
25948
+ if (!el || typeof window === "undefined") {
25949
+ return { width: (_a = el == null ? void 0 : el.clientWidth) != null ? _a : 0, height: (_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0 };
25950
+ }
25951
+ let lastW = el.clientWidth;
25952
+ let lastH = el.clientHeight;
25953
+ for (let i = 0; i < retries; i++) {
25954
+ await new Promise((resolve) => requestAnimationFrame(resolve));
25955
+ const w = el.clientWidth;
25956
+ const h = el.clientHeight;
25957
+ if (Math.abs(w - lastW) <= stableThreshold && Math.abs(h - lastH) <= stableThreshold) {
25958
+ return { width: w, height: h };
25959
+ }
25960
+ lastW = w;
25961
+ lastH = h;
25962
+ if (delayMs > 0) await new Promise((r) => setTimeout(r, delayMs));
25963
+ }
25964
+ return { width: el.clientWidth, height: el.clientHeight };
25965
+ };
25966
+ var observeAndRender = (container, renderFn, opts = {}) => {
25967
+ var _a, _b;
25968
+ const { debounceMs = 100 } = opts;
25969
+ if (!container || typeof window === "undefined" || typeof ResizeObserver === "undefined") {
25970
+ const rect = { width: (_a = container == null ? void 0 : container.clientWidth) != null ? _a : 0, height: (_b = container == null ? void 0 : container.clientHeight) != null ? _b : 0 };
25971
+ void Promise.resolve(renderFn(rect));
25972
+ return () => {
25973
+ };
25974
+ }
25975
+ let timer = null;
25976
+ let initialRenderDone = false;
25977
+ const runRender = async () => {
25978
+ if (!initialRenderDone) {
25979
+ initialRenderDone = true;
25980
+ const rect2 = await waitForStableRect(container, { retries: 15, stableThreshold: 3, delayMs: 50 });
25981
+ await Promise.resolve(renderFn(rect2));
25982
+ return;
25983
+ }
25984
+ const rect = { width: container.clientWidth, height: container.clientHeight };
25985
+ await Promise.resolve(renderFn(rect));
25986
+ };
25987
+ const schedule = () => {
25988
+ if (timer) clearTimeout(timer);
25989
+ timer = setTimeout(runRender, debounceMs);
25990
+ };
25991
+ const ro = new ResizeObserver(() => schedule());
25992
+ ro.observe(container);
25993
+ const onWindowResize = () => schedule();
25994
+ const onPageShow = (e) => (e == null ? void 0 : e.persisted) && schedule();
25995
+ window.addEventListener("resize", onWindowResize);
25996
+ window.addEventListener("pageshow", onPageShow);
25997
+ schedule();
25998
+ return () => {
25999
+ ro.disconnect();
26000
+ window.removeEventListener("resize", onWindowResize);
26001
+ window.removeEventListener("pageshow", onPageShow);
26002
+ if (timer) clearTimeout(timer);
26003
+ };
26004
+ };
25877
26005
  var getDefaultBucketConfig = (data, bucketSize) => {
25878
26006
  const DEFAULT_MIN_NUM_BUCKETS = 5;
25879
26007
  const DEFAULT_MAX_NUM_BUCKETS = 20;