@atlaskit/smart-card 40.13.0 → 40.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/i18n/en.js +5 -0
- package/dist/cjs/i18n/en_GB.js +5 -0
- package/dist/cjs/i18n/en_ZZ.js +5 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/index.js +3 -0
- package/dist/cjs/view/BlockCard/views/utils/index.js +1 -1
- package/dist/cjs/view/EmbedCard/index.js +3 -0
- package/dist/cjs/view/InlineCard/index.js +3 -0
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/i18n/en.js +5 -0
- package/dist/es2019/i18n/en_GB.js +5 -0
- package/dist/es2019/i18n/en_ZZ.js +5 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/index.js +2 -0
- package/dist/es2019/view/BlockCard/views/utils/index.js +1 -1
- package/dist/es2019/view/EmbedCard/index.js +2 -0
- package/dist/es2019/view/InlineCard/index.js +2 -0
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/i18n/en.js +5 -0
- package/dist/esm/i18n/en_GB.js +5 -0
- package/dist/esm/i18n/en_ZZ.js +5 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/index.js +2 -0
- package/dist/esm/view/BlockCard/views/utils/index.js +1 -1
- package/dist/esm/view/EmbedCard/index.js +2 -0
- package/dist/esm/view/InlineCard/index.js +2 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/extractors/action/extract-invoke-preview-action.d.ts +5 -5
- package/dist/types/extractors/common/actions/types.d.ts +2 -2
- package/dist/types/extractors/common/context/extractAccessContext.d.ts +2 -2
- package/dist/types/extractors/common/icon/extractIcon.d.ts +4 -4
- package/dist/types/extractors/common/icon/prioritiseIcon.d.ts +6 -6
- package/dist/types/extractors/common/lozenge/extractTaskType.d.ts +1 -1
- package/dist/types/extractors/common/lozenge/types.d.ts +1 -1
- package/dist/types/extractors/flexible/actions/index.d.ts +6 -6
- package/dist/types/extractors/flexible/extract-state.d.ts +2 -2
- package/dist/types/extractors/index.d.ts +3 -3
- package/dist/types/i18n/en.d.ts +5 -0
- package/dist/types/i18n/en_GB.d.ts +5 -0
- package/dist/types/i18n/en_ZZ.d.ts +5 -0
- package/dist/types/model/invoke-opts.d.ts +2 -2
- package/dist/types/ssr.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +105 -105
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +38 -38
- package/dist/types/state/hooks/use-ai-summary-config/types.d.ts +1 -1
- package/dist/types/state/hooks/use-invoke/types.d.ts +1 -1
- package/dist/types/state/hooks/useSmartLink.d.ts +2 -2
- package/dist/types/state/hooks-external/useSmartLinkActions.d.ts +14 -14
- package/dist/types/state/modal/types.d.ts +4 -4
- package/dist/types/types.d.ts +2 -2
- package/dist/types/utils/analytics/LinkAnalyticsContext.d.ts +2 -2
- package/dist/types/utils/analytics/SmartLinkAnalyticsContext.d.ts +3 -3
- package/dist/types/utils/analytics/types.d.ts +6 -6
- package/dist/types/view/BlockCard/types.d.ts +11 -11
- package/dist/types/view/BlockCard/views/utils/index.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +19 -19
- package/dist/types/view/CardWithUrl/types.d.ts +22 -22
- package/dist/types/view/EmbedCard/components/ErrorFrame.d.ts +4 -4
- package/dist/types/view/EmbedCard/components/ExpandedFrame.d.ts +22 -22
- package/dist/types/view/EmbedCard/components/Frame.d.ts +2 -2
- package/dist/types/view/EmbedCard/components/IFrame.d.ts +1 -1
- package/dist/types/view/EmbedCard/components/IframeDwellTracker.d.ts +1 -1
- package/dist/types/view/EmbedCard/components/ImageIcon.d.ts +2 -2
- package/dist/types/view/EmbedCard/components/styled.d.ts +7 -7
- package/dist/types/view/EmbedCard/types.d.ts +13 -13
- package/dist/types/view/EmbedCard/useEmbedResolvePostMessageListener.d.ts +1 -1
- package/dist/types/view/EmbedCard/views/ErroredView.d.ts +2 -2
- package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +20 -20
- package/dist/types/view/EmbedCard/views/forbidden-view/types.d.ts +1 -1
- package/dist/types/view/EmbedCard/views/not-found-view/types.d.ts +1 -1
- package/dist/types/view/EmbedModal/components/embed-content/types.d.ts +1 -1
- package/dist/types/view/EmbedModal/components/link-info/types.d.ts +1 -1
- package/dist/types/view/EmbedModal/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/action/action-button/types.d.ts +3 -3
- package/dist/types/view/FlexibleCard/components/actions/action/action-icon/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +40 -40
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.d.ts +10 -10
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.d.ts +6 -6
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.d.ts +8 -8
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/automation-action/utils/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/actions/custom-unresolved-action/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/unresolved-action/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/action-group/action-group-item/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +13 -13
- package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +11 -11
- package/dist/types/view/FlexibleCard/components/blocks/footer-block/types.d.ts +4 -4
- package/dist/types/view/FlexibleCard/components/blocks/metadata-block/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/types.d.ts +4 -4
- package/dist/types/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +8 -8
- package/dist/types/view/FlexibleCard/components/blocks/title-block/types.d.ts +35 -35
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +45 -45
- package/dist/types/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/common/image-icon/types.d.ts +5 -5
- package/dist/types/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +4 -4
- package/dist/types/view/FlexibleCard/components/container/hover-card-control/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.d.ts +8 -8
- package/dist/types/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +12 -12
- package/dist/types/view/FlexibleCard/components/elements/common/base-date-time-element/index.d.ts +8 -8
- package/dist/types/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts +19 -19
- package/dist/types/view/FlexibleCard/components/elements/common/base-link-element/index.d.ts +10 -10
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/types.d.ts +4 -4
- package/dist/types/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-items-group/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/common/base-text-element/index.d.ts +9 -9
- package/dist/types/view/FlexibleCard/components/elements/index.d.ts +4 -4
- package/dist/types/view/FlexibleCard/components/elements/media-element/index.d.ts +6 -6
- package/dist/types/view/FlexibleCard/components/elements/owned-by-element/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/elements/preview-element/index.d.ts +4 -4
- package/dist/types/view/FlexibleCard/types.d.ts +41 -41
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +3 -3
- package/dist/types/view/HoverCard/types.d.ts +26 -26
- package/dist/types/view/InlineCard/ErroredView/index.d.ts +7 -7
- package/dist/types/view/InlineCard/ForbiddenView/index.d.ts +10 -10
- package/dist/types/view/InlineCard/Frame/index.d.ts +6 -6
- package/dist/types/view/InlineCard/Frame/styled.d.ts +3 -3
- package/dist/types/view/InlineCard/IconAndTitleLayout/index.d.ts +8 -8
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +15 -15
- package/dist/types/view/InlineCard/ResolvingView/index.d.ts +6 -6
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +14 -14
- package/dist/types/view/InlineCard/types.d.ts +11 -11
- package/dist/types/view/LinkUrl/types.d.ts +2 -2
- package/dist/types/view/RelatedLinksModal/components/EmptyState.d.ts +2 -2
- package/dist/types/view/RelatedLinksModal/components/types.d.ts +10 -10
- package/dist/types/view/RelatedLinksModal/types.d.ts +5 -5
- package/dist/types/view/common/Icon.d.ts +3 -3
- package/dist/types/view/common/UnauthorisedViewContent.d.ts +5 -5
- package/dist/types/view/common/ai-prism/ai-glowing-border/types.d.ts +7 -7
- package/dist/types/view/common/ai-prism/types.d.ts +1 -1
- package/dist/types/view/common/ai-summary/types.d.ts +6 -6
- package/dist/types/view/common/render-svg.d.ts +2 -2
- package/dist/types/view/types.d.ts +6 -6
- package/dist/types-ts4.5/extractors/action/extract-invoke-preview-action.d.ts +5 -5
- package/dist/types-ts4.5/extractors/common/actions/types.d.ts +2 -2
- package/dist/types-ts4.5/extractors/common/context/extractAccessContext.d.ts +2 -2
- package/dist/types-ts4.5/extractors/common/icon/extractIcon.d.ts +4 -4
- package/dist/types-ts4.5/extractors/common/icon/prioritiseIcon.d.ts +6 -6
- package/dist/types-ts4.5/extractors/common/lozenge/extractTaskType.d.ts +1 -1
- package/dist/types-ts4.5/extractors/common/lozenge/types.d.ts +1 -1
- package/dist/types-ts4.5/extractors/flexible/actions/index.d.ts +6 -6
- package/dist/types-ts4.5/extractors/flexible/extract-state.d.ts +2 -2
- package/dist/types-ts4.5/extractors/index.d.ts +3 -3
- package/dist/types-ts4.5/i18n/en.d.ts +5 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +5 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +5 -0
- package/dist/types-ts4.5/model/invoke-opts.d.ts +2 -2
- package/dist/types-ts4.5/ssr.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +105 -105
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +38 -38
- package/dist/types-ts4.5/state/hooks/use-ai-summary-config/types.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/use-invoke/types.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +2 -2
- package/dist/types-ts4.5/state/hooks-external/useSmartLinkActions.d.ts +14 -14
- package/dist/types-ts4.5/state/modal/types.d.ts +4 -4
- package/dist/types-ts4.5/types.d.ts +2 -2
- package/dist/types-ts4.5/utils/analytics/LinkAnalyticsContext.d.ts +2 -2
- package/dist/types-ts4.5/utils/analytics/SmartLinkAnalyticsContext.d.ts +3 -3
- package/dist/types-ts4.5/utils/analytics/types.d.ts +6 -6
- package/dist/types-ts4.5/view/BlockCard/types.d.ts +11 -11
- package/dist/types-ts4.5/view/BlockCard/views/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +19 -19
- package/dist/types-ts4.5/view/CardWithUrl/types.d.ts +22 -22
- package/dist/types-ts4.5/view/EmbedCard/components/ErrorFrame.d.ts +4 -4
- package/dist/types-ts4.5/view/EmbedCard/components/ExpandedFrame.d.ts +22 -22
- package/dist/types-ts4.5/view/EmbedCard/components/Frame.d.ts +2 -2
- package/dist/types-ts4.5/view/EmbedCard/components/IFrame.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/components/IframeDwellTracker.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/components/ImageIcon.d.ts +2 -2
- package/dist/types-ts4.5/view/EmbedCard/components/styled.d.ts +7 -7
- package/dist/types-ts4.5/view/EmbedCard/types.d.ts +13 -13
- package/dist/types-ts4.5/view/EmbedCard/useEmbedResolvePostMessageListener.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/views/ErroredView.d.ts +2 -2
- package/dist/types-ts4.5/view/EmbedCard/views/ResolvedView.d.ts +20 -20
- package/dist/types-ts4.5/view/EmbedCard/views/forbidden-view/types.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedCard/views/not-found-view/types.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedModal/components/embed-content/types.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedModal/components/link-info/types.d.ts +1 -1
- package/dist/types-ts4.5/view/EmbedModal/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-button/types.d.ts +3 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-icon/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +40 -40
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/common/utils/api.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/main.d.ts +10 -10
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/main.d.ts +6 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/menu-context/main.d.ts +8 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/footer/main.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/custom-unresolved-action/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/unresolved-action/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/action-group-item/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-group/types.d.ts +13 -13
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/types.d.ts +11 -11
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/footer-block/types.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/metadata-block/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/types.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +8 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/types.d.ts +35 -35
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +45 -45
- package/dist/types-ts4.5/view/FlexibleCard/components/common/atlaskit-icon/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/common/image-icon/types.d.ts +5 -5
- package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/container/hover-card-control/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-avatar-group-element/index.d.ts +8 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-badge-element/index.d.ts +12 -12
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-date-time-element/index.d.ts +8 -8
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-icon-element/index.d.ts +19 -19
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-link-element/index.d.ts +10 -10
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-error/types.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-lozenge-element/lozenge-action/lozenge-action-items-group/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/common/base-text-element/index.d.ts +9 -9
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/index.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/media-element/index.d.ts +6 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/owned-by-element/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/preview-element/index.d.ts +4 -4
- package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +41 -41
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +3 -3
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +26 -26
- package/dist/types-ts4.5/view/InlineCard/ErroredView/index.d.ts +7 -7
- package/dist/types-ts4.5/view/InlineCard/ForbiddenView/index.d.ts +10 -10
- package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +6 -6
- package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +3 -3
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/index.d.ts +8 -8
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/index.d.ts +15 -15
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/index.d.ts +6 -6
- package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +14 -14
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +11 -11
- package/dist/types-ts4.5/view/LinkUrl/types.d.ts +2 -2
- package/dist/types-ts4.5/view/RelatedLinksModal/components/EmptyState.d.ts +2 -2
- package/dist/types-ts4.5/view/RelatedLinksModal/components/types.d.ts +10 -10
- package/dist/types-ts4.5/view/RelatedLinksModal/types.d.ts +5 -5
- package/dist/types-ts4.5/view/common/Icon.d.ts +3 -3
- package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +5 -5
- package/dist/types-ts4.5/view/common/ai-prism/ai-glowing-border/types.d.ts +7 -7
- package/dist/types-ts4.5/view/common/ai-prism/types.d.ts +1 -1
- package/dist/types-ts4.5/view/common/ai-summary/types.d.ts +6 -6
- package/dist/types-ts4.5/view/common/render-svg.d.ts +2 -2
- package/dist/types-ts4.5/view/types.d.ts +6 -6
- package/package.json +5 -6
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import type { EnvironmentsKeys, ProductType } from '@atlaskit/linking-common';
|
|
2
2
|
export interface AISummaryServiceInt {
|
|
3
|
-
summariseUrl: () => Promise<AISummaryState>;
|
|
4
3
|
state: AISummaryState;
|
|
5
4
|
subscribe: (stateSetter: StateSetter) => () => void;
|
|
5
|
+
summariseUrl: () => Promise<AISummaryState>;
|
|
6
6
|
}
|
|
7
7
|
export declare class ChunkProcessingError extends Error {
|
|
8
8
|
constructor(error: any);
|
|
9
9
|
}
|
|
10
10
|
export type AISummaryServiceProps = {
|
|
11
|
-
baseUrl?: string;
|
|
12
|
-
onError?: (id: string, reason?: string) => void;
|
|
13
|
-
onStart?: (id: string) => void;
|
|
14
|
-
onSuccess?: (id: string) => void;
|
|
15
|
-
product?: ProductType;
|
|
16
11
|
/**
|
|
17
12
|
* we should always include the ARI if possible
|
|
18
13
|
*/
|
|
19
14
|
ari?: string;
|
|
15
|
+
baseUrl?: string;
|
|
20
16
|
envKey?: EnvironmentsKeys;
|
|
21
17
|
locale?: string;
|
|
18
|
+
onError?: (id: string, reason?: string) => void;
|
|
19
|
+
onStart?: (id: string) => void;
|
|
20
|
+
onSuccess?: (id: string) => void;
|
|
21
|
+
product?: ProductType;
|
|
22
22
|
url: string;
|
|
23
23
|
};
|
|
24
24
|
export type AISummaryServiceConfig = {
|
|
25
|
-
requestUrl: string;
|
|
26
25
|
headers: Record<string, string>;
|
|
26
|
+
requestUrl: string;
|
|
27
27
|
};
|
|
28
28
|
export type AISummaryStatus = 'ready' | 'loading' | 'error' | 'done';
|
|
29
29
|
export type PostAgentPayload = {
|
|
30
|
+
agent_input_context: AgentInputContext;
|
|
31
|
+
ai_feature_input?: FeatureInputContext;
|
|
30
32
|
/**
|
|
31
33
|
* Which agent in `assistance_service` to use.
|
|
32
34
|
*/
|
|
33
35
|
recipient_agent_named_id: 'smartlink_summary_agent';
|
|
34
|
-
agent_input_context: AgentInputContext;
|
|
35
36
|
user_intent?: string;
|
|
36
|
-
ai_feature_input?: FeatureInputContext;
|
|
37
37
|
};
|
|
38
38
|
export type AgentInputContext = {
|
|
39
|
-
content_url: string;
|
|
40
39
|
content_ari?: string;
|
|
40
|
+
content_url: string;
|
|
41
|
+
locale?: string;
|
|
41
42
|
prompt_id: PromptId;
|
|
42
43
|
summary_output_mimetype?: SummaryOutputMimeType;
|
|
43
|
-
locale?: string;
|
|
44
44
|
};
|
|
45
45
|
export type FeatureInputContext = {
|
|
46
|
-
content_url: string;
|
|
47
46
|
content_ari?: string;
|
|
47
|
+
content_url: string;
|
|
48
48
|
locale?: string;
|
|
49
49
|
};
|
|
50
50
|
export type PromptId = 'smart_links';
|
|
@@ -53,62 +53,62 @@ export declare const errorMessages: readonly ["NETWORK_ERROR", "NO_ANSWER", "RAT
|
|
|
53
53
|
export type ErrorMessage = (typeof errorMessages)[number];
|
|
54
54
|
export type AISummaryState = {
|
|
55
55
|
content: string;
|
|
56
|
-
status: AISummaryStatus;
|
|
57
56
|
error?: string;
|
|
57
|
+
status: AISummaryStatus;
|
|
58
58
|
};
|
|
59
59
|
export type StateSetter = (state: AISummaryState) => any;
|
|
60
60
|
export type StreamMessage = StreamTrace | StreamAnswerPart | StreamResponse | StreamError;
|
|
61
61
|
export type StreamResponse = {
|
|
62
|
-
type: 'FINAL_RESPONSE';
|
|
63
62
|
message: {
|
|
64
|
-
message: Message;
|
|
65
63
|
content: string;
|
|
64
|
+
message: Message;
|
|
66
65
|
};
|
|
67
|
-
millisOffset?: number;
|
|
68
66
|
metadata?: {
|
|
69
67
|
request_id?: string;
|
|
70
68
|
};
|
|
69
|
+
millisOffset?: number;
|
|
70
|
+
type: 'FINAL_RESPONSE';
|
|
71
71
|
};
|
|
72
72
|
export type StreamError = {
|
|
73
|
-
type: 'ERROR';
|
|
74
73
|
message: {
|
|
75
74
|
content: string;
|
|
76
|
-
status_code?: number;
|
|
77
75
|
message_template?: ErrorMessage;
|
|
76
|
+
status_code?: number;
|
|
78
77
|
};
|
|
79
|
-
millisOffset: number;
|
|
80
78
|
metadata: null | {
|
|
81
79
|
error_message?: string;
|
|
82
80
|
request_id?: string;
|
|
83
81
|
timeout?: number;
|
|
84
82
|
};
|
|
83
|
+
millisOffset: number;
|
|
84
|
+
type: 'ERROR';
|
|
85
85
|
};
|
|
86
86
|
export type StreamAnswerPart = {
|
|
87
|
-
type: 'ANSWER_PART';
|
|
88
87
|
message: {
|
|
89
88
|
content: string;
|
|
90
89
|
role: 'ASSISTANT';
|
|
91
90
|
};
|
|
92
|
-
millisOffset: number;
|
|
93
91
|
metadata?: {
|
|
94
|
-
run_id?: string;
|
|
95
92
|
request_id?: string;
|
|
93
|
+
run_id?: string;
|
|
96
94
|
};
|
|
95
|
+
millisOffset: number;
|
|
96
|
+
type: 'ANSWER_PART';
|
|
97
97
|
};
|
|
98
98
|
export type StreamTrace = {
|
|
99
|
-
type: 'TRACE';
|
|
100
99
|
message: {
|
|
101
|
-
message_template: string;
|
|
102
100
|
content: string;
|
|
101
|
+
message_template: string;
|
|
103
102
|
user_query: string;
|
|
104
103
|
};
|
|
105
|
-
millisOffset: number;
|
|
106
104
|
metadata?: {
|
|
107
|
-
run_id: string;
|
|
108
|
-
request_id: string;
|
|
109
|
-
plugin_name?: string;
|
|
110
105
|
plugin_input?: string;
|
|
106
|
+
plugin_name?: string;
|
|
107
|
+
request_id: string;
|
|
108
|
+
run_id: string;
|
|
111
109
|
};
|
|
110
|
+
millisOffset: number;
|
|
111
|
+
type: 'TRACE';
|
|
112
112
|
};
|
|
113
113
|
export type Usage = {
|
|
114
114
|
model_usage: {
|
|
@@ -117,12 +117,12 @@ export type Usage = {
|
|
|
117
117
|
total: ModelUsage;
|
|
118
118
|
};
|
|
119
119
|
export type ModelUsage = {
|
|
120
|
-
total_tokens: number;
|
|
121
|
-
prompt_tokens: number;
|
|
122
120
|
completion_tokens: number;
|
|
121
|
+
duration: number;
|
|
122
|
+
prompt_tokens: number;
|
|
123
123
|
request_count: number;
|
|
124
124
|
total_cost: number;
|
|
125
|
-
|
|
125
|
+
total_tokens: number;
|
|
126
126
|
};
|
|
127
127
|
export type Metadata = {
|
|
128
128
|
bm25Variant?: string;
|
|
@@ -146,32 +146,32 @@ export type Message = {
|
|
|
146
146
|
content_mime_type: ContentType;
|
|
147
147
|
conversation_channel_id?: string;
|
|
148
148
|
experience_id: ExperienceId;
|
|
149
|
+
id: number;
|
|
149
150
|
message_metadata?: Metadata;
|
|
150
151
|
plugin_invocations: PluginInvocationMessage[];
|
|
151
152
|
role: Role;
|
|
152
|
-
|
|
153
|
+
sources?: Sources;
|
|
153
154
|
time_created: string;
|
|
154
155
|
user_ari: string;
|
|
155
|
-
sources?: Sources;
|
|
156
156
|
};
|
|
157
157
|
export type ContentType = 'text/markdown';
|
|
158
158
|
export type ExperienceId = 'ai-mate' | 'smart-link';
|
|
159
159
|
export type Role = 'ASSISTANT';
|
|
160
160
|
export type Appendices = Array<Appendix>;
|
|
161
161
|
export type Appendix = {
|
|
162
|
-
type: 'requestForm' | 'helpDesk';
|
|
163
|
-
content: string;
|
|
164
162
|
appendix_sources?: Sources;
|
|
163
|
+
content: string;
|
|
164
|
+
type: 'requestForm' | 'helpDesk';
|
|
165
165
|
};
|
|
166
166
|
export type Sources = Array<Source>;
|
|
167
167
|
export type Source = {
|
|
168
168
|
ari: string;
|
|
169
|
+
id: number;
|
|
170
|
+
lastModified: string;
|
|
171
|
+
message_id: number;
|
|
169
172
|
title: string;
|
|
170
173
|
type: string;
|
|
171
174
|
url: string;
|
|
172
|
-
lastModified: string;
|
|
173
|
-
message_id: number;
|
|
174
|
-
id: number;
|
|
175
175
|
};
|
|
176
176
|
export type PluginInvocation = {
|
|
177
177
|
id: number | null;
|
|
@@ -14,9 +14,9 @@ export declare function useSmartLink(id: string, url: string): {
|
|
|
14
14
|
ari: string;
|
|
15
15
|
}) => boolean) | undefined;
|
|
16
16
|
openPreviewPanel: ((props: {
|
|
17
|
-
url: string;
|
|
18
17
|
ari: string;
|
|
19
|
-
name: string;
|
|
20
18
|
iconUrl: string | undefined;
|
|
19
|
+
name: string;
|
|
20
|
+
url: string;
|
|
21
21
|
}) => void) | undefined;
|
|
22
22
|
};
|
|
@@ -7,42 +7,42 @@ export interface LinkAction {
|
|
|
7
7
|
* @example `delete-action`
|
|
8
8
|
*/
|
|
9
9
|
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* Promise to invoke on triggering this action.
|
|
12
|
+
* @example Clicking on `Delete` leading to deletion of content.
|
|
13
|
+
*/
|
|
14
|
+
invoke: () => Promise<any>;
|
|
10
15
|
/**
|
|
11
16
|
* Text to render for the action.
|
|
12
17
|
* @description Use this in tooltips and UI.
|
|
13
18
|
* @example `Delete`.
|
|
14
19
|
*/
|
|
15
20
|
text: React.ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* Promise to invoke on triggering this action.
|
|
18
|
-
* @example Clicking on `Delete` leading to deletion of content.
|
|
19
|
-
*/
|
|
20
|
-
invoke: () => Promise<any>;
|
|
21
21
|
}
|
|
22
22
|
export interface UseSmartLinkActionsOpts {
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @example https://start.atlassian.com
|
|
24
|
+
* Configure the visiblity of actions
|
|
26
25
|
*/
|
|
27
|
-
|
|
26
|
+
actionOptions?: CardActionOptions;
|
|
28
27
|
/**
|
|
29
28
|
* Appearance under which these actions will be invoked.
|
|
30
29
|
* @example `block` for card views.
|
|
31
30
|
*/
|
|
32
31
|
appearance: CardInnerAppearance;
|
|
32
|
+
/**
|
|
33
|
+
* Smart link origin that the action being invoked from.
|
|
34
|
+
*/
|
|
35
|
+
origin?: AnalyticsOrigin;
|
|
33
36
|
/**
|
|
34
37
|
* Platform on which actions are being invoked.
|
|
35
38
|
* @default 'web'
|
|
36
39
|
*/
|
|
37
40
|
platform?: JsonLd.Primitives.Platforms;
|
|
38
41
|
/**
|
|
39
|
-
* Smart
|
|
40
|
-
|
|
41
|
-
origin?: AnalyticsOrigin;
|
|
42
|
-
/**
|
|
43
|
-
* Configure the visiblity of actions
|
|
42
|
+
* Smart Link URL for which actions will be invoked.
|
|
43
|
+
* @example https://start.atlassian.com
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
url: string;
|
|
46
46
|
}
|
|
47
47
|
export declare function useSmartLinkActions({ url, appearance, origin, actionOptions, }: UseSmartLinkActionsOpts): {
|
|
48
48
|
id: string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
export type SmartLinkModalAPI = {
|
|
3
|
+
/**
|
|
4
|
+
* Remove modal component.
|
|
5
|
+
*/
|
|
6
|
+
close: () => void;
|
|
3
7
|
/**
|
|
4
8
|
* Insert a modal component on the root of Card or standalone HoverCard.
|
|
5
9
|
* This is to ensure that the modal would not be unmounted
|
|
6
10
|
* when HoverCard is unmounted.
|
|
7
11
|
*/
|
|
8
12
|
open: (node: JSX.Element) => void;
|
|
9
|
-
/**
|
|
10
|
-
* Remove modal component.
|
|
11
|
-
*/
|
|
12
|
-
close: () => void;
|
|
13
13
|
};
|
|
14
14
|
export type SmartLinkModalProviderProps = {
|
|
15
15
|
children?: ReactNode;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -8,8 +8,8 @@ export { type CardProps, type CardAppearance, type CardPlatform } from './view/C
|
|
|
8
8
|
export type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
|
|
9
9
|
export type LozengeColor = 'default' | 'success' | 'removed' | 'inprogress' | 'new' | 'moved';
|
|
10
10
|
export interface LozengeProps {
|
|
11
|
-
text: string;
|
|
12
11
|
appearance?: LozengeColor;
|
|
13
|
-
style?: AtlaskitLozengeProps['style'];
|
|
14
12
|
isBold?: boolean;
|
|
13
|
+
style?: AtlaskitLozengeProps['style'];
|
|
14
|
+
text: string;
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type LinkAnalyticsContextProps = {
|
|
3
|
-
|
|
3
|
+
children?: React.ReactNode;
|
|
4
4
|
/**
|
|
5
5
|
* The display mode of the link
|
|
6
6
|
* @example 'url'
|
|
@@ -8,7 +8,7 @@ type LinkAnalyticsContextProps = {
|
|
|
8
8
|
display?: string | undefined;
|
|
9
9
|
id?: string | undefined;
|
|
10
10
|
source?: string;
|
|
11
|
-
|
|
11
|
+
url?: string;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Provides an analytics context to supply attributes to events based on a URL
|
|
@@ -2,18 +2,18 @@ import React from 'react';
|
|
|
2
2
|
import { getResolvedAttributes } from '@atlaskit/link-analytics/resolved-attributes';
|
|
3
3
|
import { context } from './analytics';
|
|
4
4
|
type SmartLinkAnalyticsContextProps = {
|
|
5
|
-
|
|
5
|
+
children?: React.ReactNode;
|
|
6
6
|
display?: string;
|
|
7
7
|
id?: string | undefined;
|
|
8
8
|
source?: string;
|
|
9
|
-
|
|
9
|
+
url: string;
|
|
10
10
|
};
|
|
11
11
|
type SmartLinkAnalyticsContextType = {
|
|
12
|
-
source?: string;
|
|
13
12
|
attributes?: typeof context & ReturnType<typeof getResolvedAttributes> & {
|
|
14
13
|
display?: string;
|
|
15
14
|
id?: string;
|
|
16
15
|
};
|
|
16
|
+
source?: string;
|
|
17
17
|
};
|
|
18
18
|
/**
|
|
19
19
|
* Provides an analytics context data to supply attributes to events based on a URL
|
|
@@ -3,10 +3,6 @@ export type DestinationSubproduct = 'core' | 'software' | 'servicedesk';
|
|
|
3
3
|
export type ClickType = 'left' | 'middle' | 'right' | 'keyboard' | 'none';
|
|
4
4
|
export type ClickOutcome = 'prevented' | 'clickThrough' | 'clickThroughNewTabOrWindow' | 'contextMenu' | 'alt' | 'contentEditable' | 'previewPanel' | 'unknown';
|
|
5
5
|
export type UiLinkClickedEventProps = {
|
|
6
|
-
/**
|
|
7
|
-
* Whether the click occurred with the left, middle or right mouse button
|
|
8
|
-
*/
|
|
9
|
-
clickType: ClickType;
|
|
10
6
|
/**
|
|
11
7
|
* The user outcome for clicking the link as far as can be reasonably be determined
|
|
12
8
|
* This ignores any programmatic cancellation of the outcome (ie e.preventDefault()) and
|
|
@@ -14,11 +10,15 @@ export type UiLinkClickedEventProps = {
|
|
|
14
10
|
*/
|
|
15
11
|
clickOutcome: ClickOutcome;
|
|
16
12
|
/**
|
|
17
|
-
*
|
|
13
|
+
* Whether the click occurred with the left, middle or right mouse button
|
|
18
14
|
*/
|
|
19
|
-
|
|
15
|
+
clickType: ClickType;
|
|
20
16
|
/**
|
|
21
17
|
* Whether the browser's default behaviour was prevented programmatically
|
|
22
18
|
*/
|
|
23
19
|
defaultPrevented: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The keys held by the user at the time of clicking the link (which influence `clickOutcome`)
|
|
22
|
+
*/
|
|
23
|
+
keysHeld: ('alt' | 'ctrl' | 'meta' | 'shift')[];
|
|
24
24
|
};
|
|
@@ -3,21 +3,21 @@ import { type CardState } from '../../state/types';
|
|
|
3
3
|
import { type CardActionOptions, type OnResolveCallback } from '../Card/types';
|
|
4
4
|
import { type OnErrorCallback } from '../types';
|
|
5
5
|
export type BlockCardProps = {
|
|
6
|
-
|
|
7
|
-
url: string;
|
|
8
|
-
cardState: CardState;
|
|
6
|
+
actionOptions?: CardActionOptions;
|
|
9
7
|
authFlow?: CardAuthFlowOpts['authFlow'];
|
|
8
|
+
cardState: CardState;
|
|
9
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
10
|
+
linkType?: string;
|
|
11
|
+
sourceUrl: string;
|
|
12
|
+
}>;
|
|
10
13
|
handleAuthorize: (() => void) | undefined;
|
|
11
14
|
handleFrameClick: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
|
|
15
|
+
hideIconLoadingSkeleton?: boolean;
|
|
16
|
+
id: string;
|
|
12
17
|
isSelected?: boolean;
|
|
13
|
-
onResolve?: OnResolveCallback;
|
|
14
18
|
onError?: OnErrorCallback;
|
|
15
|
-
|
|
16
|
-
actionOptions?: CardActionOptions;
|
|
19
|
+
onResolve?: OnResolveCallback;
|
|
17
20
|
renderers?: CardProviderRenderers;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
linkType?: string;
|
|
21
|
-
}>;
|
|
22
|
-
hideIconLoadingSkeleton?: boolean;
|
|
21
|
+
testId?: string;
|
|
22
|
+
url: string;
|
|
23
23
|
};
|
|
@@ -5,9 +5,9 @@ import type { ElementItem } from '../../../FlexibleCard/components/blocks/types'
|
|
|
5
5
|
import { type InternalFlexibleUiOptions } from '../../../FlexibleCard/types';
|
|
6
6
|
export declare const getSimulatedBetterMetadata: (cardDetails?: JsonLd.Response) => SimulatedMetadata;
|
|
7
7
|
type SimulatedMetadata = {
|
|
8
|
+
bottomMetadata?: ElementItem[];
|
|
8
9
|
titleMetadata: ElementItem[];
|
|
9
10
|
topMetadata: ElementItem[];
|
|
10
|
-
bottomMetadata?: ElementItem[];
|
|
11
11
|
};
|
|
12
12
|
export declare const FlexibleCardUiOptions: InternalFlexibleUiOptions;
|
|
13
13
|
export declare const titleBlockOptions: Partial<TitleBlockProps>;
|
|
@@ -9,9 +9,9 @@ export type { CardAppearance, CardPlatform };
|
|
|
9
9
|
export type CardInnerAppearance = CardAppearance | 'embedPreview' | 'flexible' | 'hoverCardPreview';
|
|
10
10
|
export type EmbedIframeUrlType = 'href' | 'interactiveHref';
|
|
11
11
|
export type OnResolveCallback = (data: {
|
|
12
|
-
url?: string;
|
|
13
|
-
title?: string;
|
|
14
12
|
aspectRatio?: number;
|
|
13
|
+
title?: string;
|
|
14
|
+
url?: string;
|
|
15
15
|
}) => void;
|
|
16
16
|
export declare enum CardAction {
|
|
17
17
|
DownloadAction = "DownloadAction",
|
|
@@ -26,8 +26,8 @@ export declare enum CardAction {
|
|
|
26
26
|
export type CardActionOptions = {
|
|
27
27
|
hide: true;
|
|
28
28
|
} | {
|
|
29
|
-
hide: false;
|
|
30
29
|
exclude?: Array<CardAction>;
|
|
30
|
+
hide: false;
|
|
31
31
|
};
|
|
32
32
|
interface ActionProps {
|
|
33
33
|
/**
|
|
@@ -39,26 +39,38 @@ interface ActionProps {
|
|
|
39
39
|
actionOptions?: CardActionOptions;
|
|
40
40
|
}
|
|
41
41
|
interface HoverPreviewProps extends ActionProps {
|
|
42
|
-
/**
|
|
43
|
-
* Flag to display hover preview on hover.
|
|
44
|
-
*/
|
|
45
|
-
showHoverPreview?: boolean;
|
|
46
42
|
/**
|
|
47
43
|
* Configuration for hover card.
|
|
48
44
|
*/
|
|
49
45
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
46
|
+
/**
|
|
47
|
+
* Flag to display hover preview on hover.
|
|
48
|
+
*/
|
|
49
|
+
showHoverPreview?: boolean;
|
|
50
50
|
}
|
|
51
51
|
export interface BaseCardProps {
|
|
52
52
|
/**
|
|
53
53
|
* Define smart card default appearance.
|
|
54
54
|
*/
|
|
55
55
|
appearance: CardAppearance;
|
|
56
|
+
/**
|
|
57
|
+
* Competitor Prompt Component for Competitor link experiment
|
|
58
|
+
*/
|
|
59
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
60
|
+
linkType?: string;
|
|
61
|
+
sourceUrl: string;
|
|
62
|
+
}>;
|
|
56
63
|
/**
|
|
57
64
|
* The container which `react-lazily-render` listens to for scroll events.
|
|
58
65
|
* This property can be used in a scenario where you want to specify your own scroll container
|
|
59
66
|
* while the Card component is (lazy)loading.
|
|
60
67
|
*/
|
|
61
68
|
container?: HTMLElement;
|
|
69
|
+
/**
|
|
70
|
+
* When Preview panel is supported, onClick is ignored and the panel opens by default.
|
|
71
|
+
* This prop allows smartlinks inside of editor to bypass that as they have other ways to open Preview panel.
|
|
72
|
+
*/
|
|
73
|
+
disablePreviewPanel?: boolean;
|
|
62
74
|
/**
|
|
63
75
|
* A React component responsible for returning a fallback UI when smart link fails to render because of uncaught errors.
|
|
64
76
|
*/
|
|
@@ -104,18 +116,6 @@ export interface BaseCardProps {
|
|
|
104
116
|
* The url link of the resource to be resolved and shown as Smart Link.
|
|
105
117
|
*/
|
|
106
118
|
url?: string;
|
|
107
|
-
/**
|
|
108
|
-
* Competitor Prompt Component for Competitor link experiment
|
|
109
|
-
*/
|
|
110
|
-
CompetitorPrompt?: React.ComponentType<{
|
|
111
|
-
sourceUrl: string;
|
|
112
|
-
linkType?: string;
|
|
113
|
-
}>;
|
|
114
|
-
/**
|
|
115
|
-
* When Preview panel is supported, onClick is ignored and the panel opens by default.
|
|
116
|
-
* This prop allows smartlinks inside of editor to bypass that as they have other ways to open Preview panel.
|
|
117
|
-
*/
|
|
118
|
-
disablePreviewPanel?: boolean;
|
|
119
119
|
}
|
|
120
120
|
export interface InlineProps extends HoverPreviewProps {
|
|
121
121
|
/**
|
|
@@ -5,35 +5,35 @@ import { type FlexibleUiOptions } from '../FlexibleCard/types';
|
|
|
5
5
|
import { type HoverPreviewOptions } from '../HoverCard/types';
|
|
6
6
|
import { type InlinePreloaderStyle, type OnErrorCallback } from '../types';
|
|
7
7
|
export type CardWithUrlContentProps = {
|
|
8
|
-
|
|
9
|
-
url: string;
|
|
8
|
+
actionOptions?: CardActionOptions;
|
|
10
9
|
appearance: CardAppearance;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
12
|
+
linkType?: string;
|
|
13
|
+
sourceUrl: string;
|
|
14
|
+
}>;
|
|
16
15
|
container?: HTMLElement;
|
|
17
|
-
|
|
18
|
-
onResolve?: OnResolveCallback;
|
|
19
|
-
onError?: OnErrorCallback;
|
|
20
|
-
actionOptions?: CardActionOptions;
|
|
21
|
-
inheritDimensions?: boolean;
|
|
16
|
+
disablePreviewPanel?: boolean;
|
|
22
17
|
embedIframeRef?: React.Ref<HTMLIFrameElement>;
|
|
23
18
|
embedIframeUrlType?: EmbedIframeUrlType;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
children?: React.ReactNode;
|
|
27
|
-
showHoverPreview?: boolean;
|
|
19
|
+
frameStyle?: FrameStyle;
|
|
20
|
+
hideIconLoadingSkeleton?: boolean;
|
|
28
21
|
hoverPreviewOptions?: HoverPreviewOptions;
|
|
22
|
+
id: string;
|
|
23
|
+
inheritDimensions?: boolean;
|
|
24
|
+
inlinePreloaderStyle?: InlinePreloaderStyle;
|
|
25
|
+
isHovered?: boolean;
|
|
26
|
+
isSelected?: boolean;
|
|
27
|
+
onClick?: EventHandler<MouseEvent | KeyboardEvent>;
|
|
28
|
+
onError?: OnErrorCallback;
|
|
29
|
+
onResolve?: OnResolveCallback;
|
|
29
30
|
placeholder?: string;
|
|
31
|
+
platform?: CardPlatform;
|
|
30
32
|
removeTextHighlightingFromTitle?: boolean;
|
|
31
33
|
resolvingPlaceholder?: string;
|
|
34
|
+
showHoverPreview?: boolean;
|
|
35
|
+
testId?: string;
|
|
32
36
|
truncateInline?: boolean;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
linkType?: string;
|
|
36
|
-
}>;
|
|
37
|
-
hideIconLoadingSkeleton?: boolean;
|
|
38
|
-
disablePreviewPanel?: boolean;
|
|
37
|
+
ui?: FlexibleUiOptions;
|
|
38
|
+
url: string;
|
|
39
39
|
};
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
export interface FrameProps {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
8
9
|
compact?: boolean;
|
|
9
|
-
|
|
10
|
-
isHoverable?: boolean;
|
|
10
|
+
inheritDimensions?: boolean;
|
|
11
11
|
isFluidHeight?: boolean;
|
|
12
|
+
isHoverable?: boolean;
|
|
13
|
+
isSelected?: boolean;
|
|
12
14
|
testId?: string;
|
|
13
|
-
className?: string;
|
|
14
|
-
inheritDimensions?: boolean;
|
|
15
15
|
}
|
|
16
16
|
export declare const Frame: (props?: FrameProps) => JSX.Element;
|
|
17
17
|
export declare const ExpandedFrame: ({ children, isSelected, isHoverable, testId, className, isFluidHeight, }: FrameProps) => JSX.Element;
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
import { type FrameStyle } from '../types';
|
|
2
2
|
export interface ExpandedFrameProps {
|
|
3
|
-
isPlaceholder?: boolean;
|
|
4
|
-
href?: string;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
text?: React.ReactNode;
|
|
7
|
-
minWidth?: number;
|
|
8
|
-
maxWidth?: number;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
/** A flag that determines whether the card is selected in edit mode. */
|
|
11
|
-
isSelected?: boolean;
|
|
12
|
-
/** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
|
|
13
|
-
frameStyle?: FrameStyle;
|
|
14
|
-
/** The optional click handler */
|
|
15
|
-
onClick?: (evt: React.MouseEvent) => void;
|
|
16
|
-
/** For testing purposes only */
|
|
17
|
-
testId?: string;
|
|
18
|
-
/** If dimensions of the card are to be inherited from the parent */
|
|
19
|
-
inheritDimensions?: boolean;
|
|
20
3
|
/**
|
|
21
4
|
* To enable scrolling in use cases where the content will not have it's own scrollbar.
|
|
22
5
|
*
|
|
@@ -25,6 +8,25 @@ export interface ExpandedFrameProps {
|
|
|
25
8
|
* Always enable this when when the card is not resolved so the connect account button is not hiddden.
|
|
26
9
|
*/
|
|
27
10
|
allowScrollBar?: boolean;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/** Component to prompt for competitor link */
|
|
13
|
+
CompetitorPrompt?: React.ComponentType<{
|
|
14
|
+
linkType?: string;
|
|
15
|
+
sourceUrl: string;
|
|
16
|
+
}>;
|
|
17
|
+
/** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
|
|
18
|
+
frameStyle?: FrameStyle;
|
|
19
|
+
href?: string;
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
/** If dimensions of the card are to be inherited from the parent */
|
|
22
|
+
inheritDimensions?: boolean;
|
|
23
|
+
isPlaceholder?: boolean;
|
|
24
|
+
/** A flag that determines whether the card is selected in edit mode. */
|
|
25
|
+
isSelected?: boolean;
|
|
26
|
+
maxWidth?: number;
|
|
27
|
+
minWidth?: number;
|
|
28
|
+
/** The optional click handler */
|
|
29
|
+
onClick?: (evt: React.MouseEvent) => void;
|
|
28
30
|
/**
|
|
29
31
|
* Should the CSS `overflow` property be set to hidden or auto (clipping or
|
|
30
32
|
* supporting a scroll bar), or left out altogether.
|
|
@@ -35,10 +37,8 @@ export interface ExpandedFrameProps {
|
|
|
35
37
|
* @default true
|
|
36
38
|
*/
|
|
37
39
|
setOverflow?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
linkType?: string;
|
|
42
|
-
}>;
|
|
40
|
+
/** For testing purposes only */
|
|
41
|
+
testId?: string;
|
|
42
|
+
text?: React.ReactNode;
|
|
43
43
|
}
|
|
44
44
|
export declare const ExpandedFrame: ({ isPlaceholder, children, onClick, icon, text, isSelected, frameStyle, href, minWidth, maxWidth, testId, inheritDimensions, allowScrollBar, setOverflow, CompetitorPrompt, }: ExpandedFrameProps) => JSX.Element;
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
export interface FrameProps {
|
|
7
|
-
url?: string;
|
|
8
7
|
isTrusted?: boolean;
|
|
9
|
-
testId?: string;
|
|
10
8
|
onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
|
|
11
9
|
onIframeFocus?: () => void;
|
|
10
|
+
testId?: string;
|
|
12
11
|
title?: string;
|
|
12
|
+
url?: string;
|
|
13
13
|
}
|
|
14
14
|
export declare const Frame: React.ForwardRefExoticComponent<FrameProps & React.RefAttributes<HTMLIFrameElement>>;
|