@hubspot/ui-extensions 0.12.2 → 0.12.3

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 (102) hide show
  1. package/dist/__tests__/crm/utils/fetchAssociations.spec.js +1 -1
  2. package/dist/__tests__/crm/utils/fetchCrmProperties.spec.js +1 -1
  3. package/dist/crm/hooks/useAssociations.d.ts +1 -1
  4. package/dist/crm/hooks/useAssociations.js +2 -2
  5. package/dist/crm/hooks/useCrmProperties.d.ts +1 -1
  6. package/dist/crm/hooks/useCrmProperties.js +2 -2
  7. package/dist/crm/utils/fetchAssociations.d.ts +1 -1
  8. package/dist/crm/utils/fetchAssociations.js +0 -1
  9. package/dist/crm/utils/fetchCrmProperties.js +0 -1
  10. package/dist/experimental/pages/index.d.ts +4 -0
  11. package/dist/experimental/pages/index.js +3 -0
  12. package/dist/hs-internal/__tests__/createRemoteComponentInternal.spec.js +4 -4
  13. package/dist/hubspot.js +0 -1
  14. package/dist/internal/global-utils.d.ts +1 -1
  15. package/dist/internal/hook-utils.d.ts +3 -3
  16. package/dist/shared/remoteComponents.d.ts +4 -2
  17. package/dist/shared/remoteComponents.js +4 -0
  18. package/dist/shared/types/components/accordion.d.ts +2 -2
  19. package/dist/shared/types/components/alert.d.ts +2 -2
  20. package/dist/shared/types/components/app-home-header-actions.d.ts +3 -3
  21. package/dist/shared/types/components/button-row.d.ts +2 -2
  22. package/dist/shared/types/components/button.d.ts +3 -3
  23. package/dist/shared/types/components/card.d.ts +2 -2
  24. package/dist/shared/types/components/chart.d.ts +1 -1
  25. package/dist/shared/types/components/description-list.d.ts +2 -2
  26. package/dist/shared/types/components/divider.d.ts +1 -1
  27. package/dist/shared/types/components/dropdown.d.ts +2 -3
  28. package/dist/shared/types/components/empty-state.d.ts +2 -2
  29. package/dist/shared/types/components/error-state.d.ts +2 -2
  30. package/dist/shared/types/components/form.d.ts +3 -3
  31. package/dist/shared/types/components/heading.d.ts +2 -2
  32. package/dist/shared/types/components/icon.d.ts +3 -3
  33. package/dist/shared/types/components/iframe.d.ts +1 -1
  34. package/dist/shared/types/components/illustration.d.ts +1 -1
  35. package/dist/shared/types/components/image.d.ts +2 -2
  36. package/dist/shared/types/components/inputs.d.ts +1 -1
  37. package/dist/shared/types/components/layouts.d.ts +2 -2
  38. package/dist/shared/types/components/link.d.ts +3 -3
  39. package/dist/shared/types/components/list.d.ts +2 -2
  40. package/dist/shared/types/components/loading-spinner.d.ts +1 -1
  41. package/dist/shared/types/components/modal.d.ts +2 -2
  42. package/dist/shared/types/components/panel.d.ts +2 -2
  43. package/dist/shared/types/components/progress-bar.d.ts +1 -1
  44. package/dist/shared/types/components/score.d.ts +2 -2
  45. package/dist/shared/types/components/selects.d.ts +1 -1
  46. package/dist/shared/types/components/spacer.d.ts +1 -1
  47. package/dist/shared/types/components/statistics.d.ts +2 -2
  48. package/dist/shared/types/components/status-tag.d.ts +2 -2
  49. package/dist/shared/types/components/step-indicator.d.ts +1 -1
  50. package/dist/shared/types/components/table.d.ts +2 -2
  51. package/dist/shared/types/components/tabs.d.ts +2 -2
  52. package/dist/shared/types/components/tag.d.ts +3 -3
  53. package/dist/shared/types/components/text.d.ts +2 -2
  54. package/dist/shared/types/components/tile.d.ts +2 -2
  55. package/dist/shared/types/components/toggle.d.ts +1 -1
  56. package/dist/shared/types/components/toggleInputs.d.ts +1 -1
  57. package/dist/shared/types/components/tooltip.d.ts +2 -2
  58. package/dist/shared/types/crm.d.ts +2 -2
  59. package/dist/shared/types/experimental.d.ts +1 -1
  60. package/dist/shared/types/extend.d.ts +2 -2
  61. package/dist/shared/types/extension-points.d.ts +4 -5
  62. package/dist/shared/types/pages/app-pages-types.d.ts +75 -0
  63. package/dist/shared/types/pages/app-pages-types.js +1 -0
  64. package/dist/shared/types/pages/components/index.d.ts +2 -0
  65. package/dist/shared/types/pages/components/index.js +1 -0
  66. package/dist/shared/types/pages/components/page-link.d.ts +23 -0
  67. package/dist/shared/types/pages/components/page-link.js +1 -0
  68. package/dist/shared/types/pages/components/page-routes.d.ts +115 -0
  69. package/dist/shared/types/pages/components/page-routes.js +1 -0
  70. package/dist/shared/types/shared.d.ts +15 -1
  71. package/dist/shared/types/worker-globals.d.ts +17 -3
  72. package/dist/shared/utils/remote-component-registry.d.ts +1 -1
  73. package/dist/testing/__tests__/isMatch.spec.js +1 -1
  74. package/dist/testing/__tests__/mocks.runServerlessFunction.spec.js +1 -1
  75. package/dist/testing/__tests__/mocks.useAssociations.spec.js +2 -2
  76. package/dist/testing/__tests__/mocks.useCrmProperties.spec.js +2 -2
  77. package/dist/testing/__tests__/mocks.useExtensionActions.spec.js +1 -1
  78. package/dist/testing/__tests__/mocks.useExtensionApi.spec.js +1 -1
  79. package/dist/testing/__tests__/mocks.useExtensionContext.spec.js +1 -1
  80. package/dist/testing/internal/convert.d.ts +1 -1
  81. package/dist/testing/internal/convert.js +4 -5
  82. package/dist/testing/internal/debug.d.ts +1 -1
  83. package/dist/testing/internal/element.d.ts +1 -1
  84. package/dist/testing/internal/errors.d.ts +2 -2
  85. package/dist/testing/internal/fragment.d.ts +1 -1
  86. package/dist/testing/internal/match.d.ts +2 -2
  87. package/dist/testing/internal/mocks/index.d.ts +3 -3
  88. package/dist/testing/internal/mocks/index.js +1 -1
  89. package/dist/testing/internal/mocks/mock-extension-point-api.d.ts +2 -1
  90. package/dist/testing/internal/mocks/mock-extension-point-api.js +1 -1
  91. package/dist/testing/internal/mocks/mock-hooks.d.ts +1 -1
  92. package/dist/testing/internal/text.d.ts +2 -2
  93. package/dist/testing/internal/type-utils-internal.d.ts +2 -2
  94. package/dist/testing/internal/types-internal.d.ts +6 -6
  95. package/dist/testing/render.d.ts +2 -2
  96. package/dist/testing/render.js +5 -6
  97. package/dist/testing/type-utils.d.ts +1 -1
  98. package/dist/testing/type-utils.js +1 -1
  99. package/dist/testing/types.d.ts +9 -9
  100. package/dist/testing/utils.d.ts +1 -1
  101. package/dist/testing/utils.js +1 -1
  102. package/package.json +31 -23
@@ -1,4 +1,5 @@
1
1
  import { vi } from 'vitest';
2
+ import { calculatePaginationFlags, fetchAssociations, } from "../../../crm/utils/fetchAssociations.js";
2
3
  // Set up the mock before importing the module
3
4
  const mockFetchAssociations = vi.fn();
4
5
  const mockSelf = {
@@ -9,7 +10,6 @@ Object.defineProperty(global, 'self', {
9
10
  value: mockSelf,
10
11
  writable: true,
11
12
  });
12
- import { fetchAssociations, calculatePaginationFlags, } from "../../../crm/utils/fetchAssociations.js";
13
13
  describe('fetchAssociations', () => {
14
14
  // Helper functions
15
15
  const createMockResponse = (data, overrides = {}) => ({
@@ -1,4 +1,5 @@
1
1
  import { vi } from 'vitest';
2
+ import { fetchCrmProperties } from "../../../crm/utils/fetchCrmProperties.js";
2
3
  // Set up the mock before importing the module
3
4
  const mockFetchCrmProperties = vi.fn();
4
5
  const mockSelf = {
@@ -9,7 +10,6 @@ Object.defineProperty(global, 'self', {
9
10
  value: mockSelf,
10
11
  writable: true,
11
12
  });
12
- import { fetchCrmProperties } from "../../../crm/utils/fetchCrmProperties.js";
13
13
  const DEFAULT_OPTIONS = {};
14
14
  describe('fetchCrmProperties', () => {
15
15
  beforeEach(() => {
@@ -1,4 +1,4 @@
1
- import { type FetchAssociationsRequest, type AssociationResult } from '../utils/fetchAssociations.ts';
1
+ import type { AssociationResult, FetchAssociationsRequest } from '../utils/fetchAssociations.ts';
2
2
  import { type FetchCrmPropertiesOptions } from '../utils/fetchCrmProperties.ts';
3
3
  export interface UseAssociationsOptions {
4
4
  propertiesToFormat?: 'all' | string[];
@@ -1,6 +1,6 @@
1
- import { useEffect, useReducer, useMemo, useRef, useCallback } from 'react';
2
- import { fetchAssociations, DEFAULT_PAGE_SIZE, calculatePaginationFlags, } from "../utils/fetchAssociations.js";
1
+ import { useCallback, useEffect, useMemo, useReducer, useRef } from 'react';
3
2
  import { createMockAwareHook } from "../../internal/hook-utils.js";
3
+ import { calculatePaginationFlags, DEFAULT_PAGE_SIZE, fetchAssociations, } from "../utils/fetchAssociations.js";
4
4
  function createInitialState(pageSize) {
5
5
  return {
6
6
  results: [],
@@ -1,4 +1,4 @@
1
- import { type FetchCrmPropertiesOptions } from '../utils/fetchCrmProperties.ts';
1
+ import type { FetchCrmPropertiesOptions } from '../utils/fetchCrmProperties.ts';
2
2
  export interface CrmPropertiesState {
3
3
  properties: Record<string, string | null>;
4
4
  error: Error | null;
@@ -1,6 +1,6 @@
1
- import { useEffect, useReducer, useMemo, useRef, useCallback } from 'react';
2
- import { fetchCrmProperties, } from "../utils/fetchCrmProperties.js";
1
+ import { useCallback, useEffect, useMemo, useReducer, useRef } from 'react';
3
2
  import { createMockAwareHook } from "../../internal/hook-utils.js";
3
+ import { fetchCrmProperties } from "../utils/fetchCrmProperties.js";
4
4
  const initialState = {
5
5
  properties: {},
6
6
  error: null,
@@ -1,4 +1,4 @@
1
- import { FetchCrmPropertiesOptions } from './fetchCrmProperties.ts';
1
+ import type { FetchCrmPropertiesOptions } from './fetchCrmProperties.ts';
2
2
  export declare const DEFAULT_PAGE_SIZE = 10;
3
3
  /**
4
4
  * Calculate pagination flags based on current page and API hasMore flag
@@ -27,7 +27,6 @@ export const fetchAssociations = async (request, options) => {
27
27
  let response;
28
28
  let result;
29
29
  try {
30
- // eslint-disable-next-line hubspot-dev/no-confusing-browser-globals
31
30
  response = await self.fetchAssociations(request, options);
32
31
  result = await response.json();
33
32
  }
@@ -15,7 +15,6 @@ export const fetchCrmProperties = async (propertyNames, propertiesUpdatedCallbac
15
15
  let response;
16
16
  let result;
17
17
  try {
18
- // eslint-disable-next-line hubspot-dev/no-confusing-browser-globals
19
18
  response = await self.fetchCrmProperties(propertyNames, propertiesUpdatedCallback, options);
20
19
  result = await response.json();
21
20
  }
@@ -0,0 +1,4 @@
1
+ export type * from '../../shared/types/pages/components/index.ts';
2
+ export type * from '../../shared/types/pages/app-pages-types.ts';
3
+ export declare const PageRoutes: import("../../shared/types/pages/components/page-routes.ts").PageRoutesComponent, usePageRoute: import("../../shared/types/pages/app-pages-types.ts").UsePageRouteHook, createPageRouter: import("../../shared/types/pages/app-pages-types.ts").CreatePageRouterFunction;
4
+ export { PageLink } from '../../shared/remoteComponents.tsx';
@@ -0,0 +1,3 @@
1
+ import { getWorkerGlobals } from "../../internal/global-utils.js";
2
+ export const { PageRoutes, usePageRoute, createPageRouter } = getWorkerGlobals().hsWorkerAPI;
3
+ export { PageLink } from "../../shared/remoteComponents.js";
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from 'react';
2
3
  import { describe, expect, it } from 'vitest';
3
- import { createRenderer } from "../../testing/index.js";
4
- import { createRemoteComponentInternal } from "../index.js";
5
- import { __hubSpotComponentRegistry } from "../../shared/remoteComponents.js";
6
4
  import { Button, Text } from "../../index.js";
5
+ import { __hubSpotComponentRegistry } from "../../shared/remoteComponents.js";
6
+ import { createRenderer } from "../../testing/index.js";
7
7
  import { InvalidComponentsError } from "../../testing/internal/errors.js";
8
- import { useState } from 'react';
8
+ import { createRemoteComponentInternal } from "../index.js";
9
9
  // Create custom components once at the top level
10
10
  const CustomButton = createRemoteComponentInternal('TestCustomButton');
11
11
  const CustomCard = createRemoteComponentInternal('TestCustomCard', {
package/dist/hubspot.js CHANGED
@@ -1,4 +1,3 @@
1
- /* eslint-disable hubspot-dev/no-confusing-browser-globals */
2
1
  import { getWorkerGlobals } from "./internal/global-utils.js";
3
2
  const extend_V2 = getWorkerGlobals().extend_V2;
4
3
  export function serverless(name, options) {
@@ -1,4 +1,4 @@
1
- import { WorkerGlobalsInternal } from '../shared/types/worker-globals.ts';
1
+ import type { WorkerGlobalsInternal } from '../shared/types/worker-globals.ts';
2
2
  /**
3
3
  * Gets the worker globals object for the current environment.
4
4
  * @returns The worker globals object.
@@ -1,4 +1,4 @@
1
- import { RendererSpies } from '../testing/types.ts';
1
+ import type { RendererSpies } from '../testing/types.ts';
2
2
  type AnyFunction = (...args: any[]) => any;
3
3
  /**
4
4
  * Creates a mock-aware hook function that can be used to mock the original hook function.
@@ -15,12 +15,12 @@ export declare const createMockAwareHook: <THookName extends keyof RendererSpies
15
15
  *
16
16
  * @returns The mocks object or null if not in a test environment.
17
17
  */
18
- export declare function useMocksContext(): RendererSpies<"home" | "settings" | "crm.record.tab" | "crm.record.sidebar" | "crm.preview" | "helpdesk.sidebar" | "uie.playground.middle"> | null;
18
+ export declare function useMocksContext(): RendererSpies<"crm.record.tab" | "crm.record.sidebar" | "crm.preview" | "helpdesk.sidebar" | "settings" | "home" | "uie.playground.middle"> | null;
19
19
  /**
20
20
  * A React component that provides the Mocks context that can be used to provide mocks to the mock-aware hook functions.
21
21
  *
22
22
  * @param children The children to render.
23
23
  * @returns The children wrapped in the Mocks context provider.
24
24
  */
25
- export declare const MocksContextProvider: import("react").Provider<RendererSpies<"home" | "settings" | "crm.record.tab" | "crm.record.sidebar" | "crm.preview" | "helpdesk.sidebar" | "uie.playground.middle"> | null>;
25
+ export declare const MocksContextProvider: import("react").Provider<RendererSpies<"crm.record.tab" | "crm.record.sidebar" | "crm.preview" | "helpdesk.sidebar" | "settings" | "home" | "uie.playground.middle"> | null>;
26
26
  export {};
@@ -1,6 +1,7 @@
1
- import type * as experimentalTypes from './types/experimental.ts';
2
1
  import type * as componentTypes from './types/components/index.ts';
3
- import * as crmTypes from './types/crm.ts';
2
+ import type * as crmTypes from './types/crm.ts';
3
+ import type * as experimentalTypes from './types/experimental.ts';
4
+ import type * as pageComponentTypes from './types/pages/components/index.ts';
4
5
  /**
5
6
  * Represents a registry of HubSpot-provided React components that should only be used **internally** by the UI extension SDK.
6
7
  *
@@ -625,6 +626,7 @@ export declare const PrimaryHeaderActionButton: import("./types/shared.ts").HubS
625
626
  *
626
627
  */
627
628
  export declare const SecondaryHeaderActionButton: import("./types/shared.ts").HubSpotReactComponent<componentTypes.HeaderActionButtonProps>;
629
+ export declare const PageLink: import("./types/shared.ts").HubSpotReactComponent<pageComponentTypes.PageLinkProps>;
628
630
  /**
629
631
  * @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates.
630
632
  */
@@ -646,6 +646,10 @@ export const SecondaryHeaderActionButton = createAndRegisterRemoteReactComponent
646
646
  fragmentProps: ['overlay'],
647
647
  });
648
648
  ////////////////////////////////////////////////////////
649
+ // APP PAGE COMPONENTS
650
+ ////////////////////////////////////////////////////////
651
+ export const PageLink = createAndRegisterRemoteReactComponent('PageLink');
652
+ ////////////////////////////////////////////////////////
649
653
  // EXPERIMENTAL COMPONENTS
650
654
  ////////////////////////////////////////////////////////
651
655
  /**
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { TShirtSizes, BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [Accordion](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/accordion).
5
5
  *
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [Alert](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/alert).
5
5
  *
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
2
- import { ReactionsHandler } from '../reactions.ts';
3
- import { ExtensionEvent, OverlayComponentProps, HrefProp, BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { ReactionsHandler } from '../reactions.ts';
3
+ import type { BaseComponentProps, ExtensionEvent, HrefProp, OverlayComponentProps } from '../shared.ts';
4
4
  /**
5
5
  * The props type for [HeaderActions](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/create-an-app-home-page#headeractions).
6
6
  *
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { TShirtSizes, BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [ButtonRow](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/button-row).
5
5
  *
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
2
- import { OverlayComponentProps, HrefProp, TShirtSizes, IconNames, ExtensionEvent, BaseComponentProps } from '../shared.ts';
3
- import { ReactionsHandler } from '../reactions.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { ReactionsHandler } from '../reactions.ts';
3
+ import type { BaseComponentProps, ExtensionEvent, HrefProp, IconNames, OverlayComponentProps, TShirtSizes } from '../shared.ts';
4
4
  export interface BaseButtonProps extends BaseComponentProps {
5
5
  /**
6
6
  * A function that will be invoked when the button is clicked. It receives an event object and a reactions object
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for {@link !components.Card}.
5
5
  *
@@ -1,4 +1,4 @@
1
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps } from '../shared.ts';
2
2
  export interface ChartProps extends BaseComponentProps {
3
3
  /**
4
4
  * An object containing the chart's data in an array.
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [DescriptionListItem](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/description-list).
5
5
  *
@@ -1,4 +1,4 @@
1
- import { AllDistances, BaseComponentProps } from '../shared.ts';
1
+ import type { AllDistances, BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * The props type for [Divider](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/divider).
4
4
  *
@@ -1,7 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
- import { TShirtSizes, BaseComponentProps } from '../shared.ts';
3
- import { ExtensionEvent, OverlayComponentProps } from '../shared.ts';
4
- import { ReactionsHandler } from '../reactions.ts';
2
+ import type { ReactionsHandler } from '../reactions.ts';
3
+ import type { BaseComponentProps, ExtensionEvent, OverlayComponentProps, TShirtSizes } from '../shared.ts';
5
4
  /**
6
5
  * @deprecated This type is deprecated and will be removed in a future release. Please use the `DropdownButtonItem` component instead.
7
6
  */
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  export type EmptyStateImageName = 'addOnReporting' | 'announcement' | 'api' | 'automatedTesting' | 'beta' | 'building' | 'callingSetUp' | 'companies' | 'components' | 'cone' | 'contacts' | 'contentStrategy' | 'customObjects' | 'customerExperience' | 'customerSupport' | 'deals' | 'developerSecurityUpdate' | 'electronicSignature' | 'electronicSignatureEmptyState' | 'emailConfirmation' | 'emptyStateCharts' | 'idea' | 'integrations' | 'leads' | 'lock' | 'meetings' | 'missedGoal' | 'multipleObjects' | 'object' | 'productsShoppingCart' | 'registration' | 'sandboxAddOn' | 'social' | 'store' | 'storeDisabled' | 'successfullyConnectedEmail' | 'target' | 'task' | 'tickets' | 'voteAndSearch';
4
4
  /**
5
5
  * The props type for [EmptyState](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/empty-state).
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [ErrorState](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/error-state).
5
5
  *
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
2
- import { FormSubmitExtensionEvent, BaseComponentProps } from '../shared.ts';
3
- import { ReactionsHandler } from '../reactions.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { ReactionsHandler } from '../reactions.ts';
3
+ import type { BaseComponentProps, FormSubmitExtensionEvent } from '../shared.ts';
4
4
  export type FormInputValues = Record<string, string | number>;
5
5
  /**
6
6
  * The props type for [Form](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/form).
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [Heading](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/heading).
5
5
  *
@@ -1,4 +1,4 @@
1
- import { TShirtSizes, IconNames, BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps, IconNames, TShirtSizes } from '../shared.ts';
2
2
  export type IconColor = 'alert' | 'warning' | 'success' | 'inherit';
3
3
  /**
4
4
  * The props type for [Icon](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/icon).
@@ -7,13 +7,13 @@ export type IconColor = 'alert' | 'warning' | 'success' | 'inherit';
7
7
  */
8
8
  export interface IconProps extends BaseComponentProps {
9
9
  /**
10
- * The color of the icon.
10
+ * The color of the icon. See the [colors section](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/icon#colors) for details.
11
11
  *
12
12
  * @defaultValue `"inherit"`
13
13
  */
14
14
  color?: IconColor;
15
15
  /**
16
- * Sets the icon to display.
16
+ * Sets the icon to display. See [all available icons](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/icon#available-icons).
17
17
  */
18
18
  name: IconNames;
19
19
  /**
@@ -1,4 +1,4 @@
1
- import { TShirtSizes, BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
2
2
  /**
3
3
  * The props type for {@link !components.Iframe}.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * The props type for [Illustration](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/illustration).
4
4
  *
@@ -1,5 +1,5 @@
1
- import { OverlayComponentProps, HrefProp, ExtensionEvent, BaseComponentProps } from '../shared.ts';
2
- import { ReactionsHandler } from '../reactions.ts';
1
+ import type { ReactionsHandler } from '../reactions.ts';
2
+ import type { BaseComponentProps, ExtensionEvent, HrefProp, OverlayComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [Image](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/image).
5
5
  *
@@ -1,4 +1,4 @@
1
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * Generic collection of props for all inputs
4
4
  * @internal
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { AllDistances, BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { AllDistances, BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [Stack](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/flex).
5
5
  *
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
2
- import { OverlayComponentProps, ExtensionEvent, HrefProp, BaseComponentProps } from '../shared.ts';
3
- import { ReactionsHandler } from '../reactions.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { ReactionsHandler } from '../reactions.ts';
3
+ import type { BaseComponentProps, ExtensionEvent, HrefProp, OverlayComponentProps } from '../shared.ts';
4
4
  /**
5
5
  * The props type for [Link](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/link).
6
6
  *
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [List](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/list).
5
5
  *
@@ -1,4 +1,4 @@
1
- import { TShirtSizes, BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
2
2
  /**
3
3
  * The props type for [LoadingSpinner](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/loading-spinner).
4
4
  *
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { TShirtSizes, BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
3
3
  export interface ModalProps extends BaseComponentProps {
4
4
  /**
5
5
  * The modal's accessibility label.
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { TShirtSizes, BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
3
3
  export interface PanelProps extends BaseComponentProps {
4
4
  /**
5
5
  * The panel's accessibility label.
@@ -1,4 +1,4 @@
1
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * The props type for [ProgressBar](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/progress-bar).
4
4
  *
@@ -1,6 +1,6 @@
1
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps } from '../shared.ts';
2
2
  /**
3
- * The props type for {@link !components.ScoreCircle}.
3
+ * The props type for [ScoreCircle](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/scorecircle)
4
4
  *
5
5
  * @category Component Props
6
6
  */
@@ -1,4 +1,4 @@
1
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * Generic collection of props for select components
4
4
  * @internal
@@ -1,4 +1,4 @@
1
- import { AllSizesUnaliased, BaseComponentProps } from '../shared.ts';
1
+ import type { AllSizesUnaliased, BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * The props type for [Spacer](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/spacer)
4
4
  *
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [StatisticsTrend](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/statistics).
5
5
  *
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [StatusTag](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/status-tag).
5
5
  *
@@ -1,4 +1,4 @@
1
- import { AllSizes, BaseComponentProps } from '../shared.ts';
1
+ import type { AllSizes, BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * The props type for [StepIndicator](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/step-indicator).
4
4
  *
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  export interface AlignmentProps {
4
4
  /**
5
5
  * Sets the alignment of the table element.
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  export interface TabsProps extends BaseComponentProps {
4
4
  /**
5
5
  * Sets the content that will render inside the component.
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
2
- import { OverlayComponentProps, ExtensionEvent, BaseComponentProps } from '../shared.ts';
3
- import { ReactionsHandler } from '../reactions.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { ReactionsHandler } from '../reactions.ts';
3
+ import type { BaseComponentProps, ExtensionEvent, OverlayComponentProps } from '../shared.ts';
4
4
  /**
5
5
  * The props type for [Tag](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/tag).
6
6
  *
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * @internal
5
5
  * Format options for text component.
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  /**
4
4
  * The props type for [Tile](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/tile).
5
5
  *
@@ -1,4 +1,4 @@
1
- import { TShirtSizes, BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
2
2
  /**
3
3
  * The props type for [Toggle](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/toggle).
4
4
  *
@@ -1,4 +1,4 @@
1
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { BaseComponentProps } from '../shared.ts';
2
2
  /**
3
3
  * The props type for [Checkbox](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/checkbox).
4
4
  *
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { BaseComponentProps } from '../shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps } from '../shared.ts';
3
3
  export interface TooltipProps extends BaseComponentProps {
4
4
  /**
5
5
  * Sets the content to render on the screen, and serves as the trigger for the tooltip. This prop is passed implicitly by providing sub-components.
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { TShirtSizes, BaseComponentProps } from './shared.ts';
1
+ import type { ReactNode } from 'react';
2
+ import type { BaseComponentProps, TShirtSizes } from './shared.ts';
3
3
  export interface CrmDataHighlightProps extends BaseComponentProps {
4
4
  /**
5
5
  * The properties to display, up to four. By default, will display property data from the currently displaying record. To pull data from a specific record, include the `objectTypeId` and `objectId` props.
@@ -1,6 +1,6 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { ReactionsHandler } from './reactions.ts';
3
- import type { AllDistances, ExtensionEvent, BaseComponentProps } from './shared.ts';
3
+ import type { AllDistances, BaseComponentProps, ExtensionEvent } from './shared.ts';
4
4
  /**
5
5
  * @ignore
6
6
  * @experimental do not use in production
@@ -1,4 +1,4 @@
1
- import { ReactElement } from 'react';
2
- import { ExtensionPointApi, ExtensionPoints } from './extension-points.ts';
1
+ import type { ReactElement } from 'react';
2
+ import type { ExtensionPointApi, ExtensionPoints } from './extension-points.ts';
3
3
  export type RenderExtensionCallback<TExtensionPointName extends keyof ExtensionPoints> = (api: ExtensionPointApi<TExtensionPointName>) => ReactElement<any>;
4
4
  export type HubspotExtendFunction = <TExtensionPointName extends keyof ExtensionPoints>(renderExtensionCallback: RenderExtensionCallback<TExtensionPointName>) => void;