@flamingo-stack/openframe-frontend-core 0.0.725 → 0.0.728
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/{chunk-JVHP7Y4S.js → chunk-2F4DO7DS.js} +2 -2
- package/dist/{chunk-4ZZ4TNCY.cjs → chunk-32QAIKXR.cjs} +9 -9
- package/dist/{chunk-AI3CLDZO.cjs → chunk-33QHEG7K.cjs} +289 -285
- package/dist/{chunk-QV4GO3GW.cjs → chunk-4ICMFNCJ.cjs} +29 -56
- package/dist/{chunk-YPEILGVZ.cjs → chunk-5K3QUH7C.cjs} +3 -3
- package/dist/{chunk-5FVWDDX6.js → chunk-66XG5RFJ.js} +2 -2
- package/dist/{chunk-ZSXZE4FJ.cjs → chunk-7N6M77PI.cjs} +3 -3
- package/dist/{chunk-2VOZ37BL.cjs → chunk-7VYBSCCL.cjs} +35 -35
- package/dist/{chunk-7V5KFBY2.cjs → chunk-APJCBQ7X.cjs} +16 -16
- package/dist/{chunk-RU6BTELI.cjs → chunk-CELBOIKC.cjs} +538 -491
- package/dist/{chunk-SEVKFMKR.cjs → chunk-CI7KWY6L.cjs} +3 -3
- package/dist/{chunk-OBMWSUBK.js → chunk-EM3WCK2K.js} +5 -5
- package/dist/{chunk-ASHRHL4W.js → chunk-GEUUDNCI.js} +5 -5
- package/dist/{chunk-ZZRUKEN2.js → chunk-GINCQZMM.js} +3 -3
- package/dist/{chunk-AX4F35C2.js → chunk-HP4C2DFL.js} +1 -1
- package/dist/{chunk-ASIXPRHV.js → chunk-HTQJSW3Y.js} +3 -3
- package/dist/{chunk-SE4O4HCD.cjs → chunk-OKEJY2GC.cjs} +8 -8
- package/dist/{chunk-B7234BE2.cjs → chunk-OYU7QNLQ.cjs} +11 -11
- package/dist/{chunk-PUADVXJD.js → chunk-QL4RUHKU.js} +1 -1
- package/dist/{chunk-LYQYLPPV.cjs → chunk-RMXLHYEG.cjs} +26 -26
- package/dist/{chunk-MGTZ2BKY.js → chunk-SKEW5NMJ.js} +22 -49
- package/dist/{chunk-772242QR.cjs → chunk-SSXQYS5K.cjs} +65 -65
- package/dist/{chunk-F56GNKX2.js → chunk-TYMLEI2I.js} +2 -2
- package/dist/{chunk-MLFS5G3V.js → chunk-UF3NFAQK.js} +315 -268
- package/dist/{chunk-2SO3OJFY.cjs → chunk-UJZ5Y3RK.cjs} +33 -33
- package/dist/{chunk-W2DXHR2R.js → chunk-URYLQ4MC.js} +15 -11
- package/dist/{chunk-F77J34W2.js → chunk-VGRQK7YS.js} +1 -1
- package/dist/{chunk-IOTAUWWF.js → chunk-XYSKJ7GA.js} +1 -1
- package/dist/{chunk-LR6DJY4Z.cjs → chunk-YREYU6DY.cjs} +9 -9
- package/dist/{chunk-JAKG6BY7.js → chunk-ZDGK2TNJ.js} +3 -3
- package/dist/{cloud-tenants-SMULXU54.cjs → cloud-tenants-XP3L6PWO.cjs} +3 -3
- package/dist/{cloud-tenants-US63E2HV.js → cloud-tenants-XVVFCOK2.js} +2 -2
- package/dist/components/case-studies/index.cjs +14 -14
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/assistant-ask-prompts.d.ts +34 -14
- package/dist/components/chat/assistant-ask-prompts.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/hooks/index.d.ts +1 -1
- package/dist/components/chat/hooks/index.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-ask-prompts.d.ts +34 -7
- package/dist/components/chat/hooks/use-ask-prompts.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -4
- package/dist/components/chat/index.js +3 -5
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/faq-ask-card.d.ts +8 -11
- package/dist/components/faq/faq-ask-card.d.ts.map +1 -1
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/auth/auth-benefits-panel.d.ts +3 -1
- package/dist/components/features/auth/auth-benefits-panel.d.ts.map +1 -1
- package/dist/components/features/auth/auth-shell.d.ts +3 -1
- package/dist/components/features/auth/auth-shell.d.ts.map +1 -1
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +71 -71
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +35 -37
- package/dist/components/index.js +14 -16
- package/dist/components/meeting-scheduler/index.cjs +19 -19
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/product-demo/index.cjs +6 -6
- package/dist/components/product-demo/index.js +6 -6
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -5
- package/dist/components/ui/index.js +4 -6
- package/dist/{devices-6ZURNFRB.cjs → devices-MMHLY67A.cjs} +4 -4
- package/dist/{devices-JWHGWKLK.js → devices-S7PJJI66.js} +2 -2
- package/dist/index.cjs +7 -7
- package/dist/index.js +14 -14
- package/dist/{knowledge-CY66JZ54.cjs → knowledge-LJNFAJNE.cjs} +4 -4
- package/dist/{knowledge-TEDPLCFX.js → knowledge-WW3LOQKN.js} +2 -2
- package/dist/{logs-MO357RE7.cjs → logs-F4ZVNUKQ.cjs} +11 -11
- package/dist/{logs-S46THPPD.js → logs-I4DMHQDA.js} +2 -2
- package/dist/{policies-GSH4K5YP.cjs → policies-KZXFXGD7.cjs} +7 -7
- package/dist/{policies-BUXT7DKF.js → policies-RX55V46V.js} +2 -2
- package/dist/{software-update-2ETT35NM.cjs → software-update-4A242VDB.cjs} +6 -6
- package/dist/{software-update-YKS6KLX2.js → software-update-VI7FQYR4.js} +2 -2
- package/dist/utils/index.cjs +25 -24
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +23 -23
- package/dist/utils/source-grouping.d.ts +15 -5
- package/dist/utils/source-grouping.d.ts.map +1 -1
- package/dist/utils/trial.d.ts +17 -9
- package/dist/utils/trial.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/assistant-ask-prompts.tsx +84 -39
- package/src/components/chat/entity-cards/dispatch.tsx +47 -58
- package/src/components/chat/hooks/index.ts +3 -2
- package/src/components/chat/hooks/use-ask-prompts.ts +140 -56
- package/src/components/faq/faq-ask-card.tsx +22 -67
- package/src/components/features/auth/auth-benefits-panel.tsx +15 -8
- package/src/components/features/auth/auth-shell.tsx +4 -2
- package/src/utils/index.ts +1 -1
- package/src/utils/source-grouping.ts +24 -14
- package/src/utils/source-icons.ts +16 -16
- package/src/utils/trial.ts +16 -10
package/dist/utils/index.js
CHANGED
|
@@ -714,14 +714,15 @@ function groupTokenRatesByProvider(rates) {
|
|
|
714
714
|
}
|
|
715
715
|
|
|
716
716
|
// src/utils/trial.ts
|
|
717
|
-
var
|
|
718
|
-
var TRIAL_LABELS = {
|
|
719
|
-
/** "14 day free trial" */
|
|
720
|
-
length: `${TRIAL_DAYS} day free trial`,
|
|
717
|
+
var TRIAL_TERMS = {
|
|
721
718
|
noCard: "No card required",
|
|
722
719
|
cancel: "Cancel Anytime",
|
|
723
720
|
noContract: "No Contract"
|
|
724
721
|
};
|
|
722
|
+
var trialLengthLabel = (days) => `${days} day free trial`;
|
|
723
|
+
function trialLabels(days) {
|
|
724
|
+
return { ...TRIAL_TERMS, length: days === null || days === void 0 || days === "" ? null : trialLengthLabel(days) };
|
|
725
|
+
}
|
|
725
726
|
var PLAY_ICON_PATH = "M4.875 5.006c0-2.501 2.793-3.989 4.87-2.592l9.78 6.578c2.135 1.437 2.135 4.58 0 6.016l-9.78 6.579c-2.077 1.396-4.87-.091-4.87-2.593zm2.25 13.988c0 .7.783 1.118 1.364.727l9.78-6.58c.81-.545.81-1.738 0-2.283L8.488 4.28a.875.875 0 0 0-1.364.726v13.988Z";
|
|
726
727
|
|
|
727
728
|
// src/utils/color-analysis.ts
|
|
@@ -3573,11 +3574,11 @@ var SOURCE_ICON_NAMES = {
|
|
|
3573
3574
|
vendors: "package-search",
|
|
3574
3575
|
// Financials
|
|
3575
3576
|
"investor-updates": "mail",
|
|
3576
|
-
"financial-kpis": "
|
|
3577
|
-
"financial-cap-table": "
|
|
3578
|
-
"financial-pnl": "
|
|
3579
|
-
"financial-balance-sheet": "
|
|
3580
|
-
"financial-cash-flow": "
|
|
3577
|
+
"financial-kpis": "chart-bar-01-ver",
|
|
3578
|
+
"financial-cap-table": "chart-pie",
|
|
3579
|
+
"financial-pnl": "money-bill-dollar",
|
|
3580
|
+
"financial-balance-sheet": "bank",
|
|
3581
|
+
"financial-cash-flow": "coins-exchange-currency",
|
|
3581
3582
|
// ClickUp
|
|
3582
3583
|
"clickup-roadmap": "clickup",
|
|
3583
3584
|
"clickup-delivery": "clickup",
|
|
@@ -3596,22 +3597,22 @@ var SOURCE_ICON_NAMES = {
|
|
|
3596
3597
|
// Communications
|
|
3597
3598
|
"slack-messages": "slack",
|
|
3598
3599
|
// People-hub employee content
|
|
3599
|
-
"what-i-shipped": "
|
|
3600
|
-
"how-i-work": "
|
|
3601
|
-
"ai-prompts": "
|
|
3600
|
+
"what-i-shipped": "rocket-02",
|
|
3601
|
+
"how-i-work": "clipboard-list",
|
|
3602
|
+
"ai-prompts": "chat-quote",
|
|
3602
3603
|
// Product-hub internal
|
|
3603
3604
|
"design-docs": "file-text",
|
|
3604
3605
|
"openframe-tenants": "openframe",
|
|
3605
|
-
"prospect-calls": "
|
|
3606
|
+
"prospect-calls": "call",
|
|
3606
3607
|
// Code intelligence
|
|
3607
|
-
"code-rules": "check
|
|
3608
|
-
"code-graph-repos": "
|
|
3608
|
+
"code-rules": "bracket-curly-check",
|
|
3609
|
+
"code-graph-repos": "coding-branch",
|
|
3609
3610
|
"code-graph-deployments": "package",
|
|
3610
|
-
"code-graph-files": "file-
|
|
3611
|
-
"code-symbols": "
|
|
3612
|
-
"code-duplicates": "
|
|
3613
|
-
"code-impact": "
|
|
3614
|
-
"change-sets": "coding-
|
|
3611
|
+
"code-graph-files": "file-code",
|
|
3612
|
+
"code-symbols": "code-square",
|
|
3613
|
+
"code-duplicates": "copy-01",
|
|
3614
|
+
"code-impact": "coding-pull-request",
|
|
3615
|
+
"change-sets": "coding-merge"
|
|
3615
3616
|
};
|
|
3616
3617
|
function getSourceIconName(tableId) {
|
|
3617
3618
|
if (!tableId) return void 0;
|
|
@@ -3785,8 +3786,7 @@ function typeOf(source) {
|
|
|
3785
3786
|
return source.documentType || defaultDocumentTypeForTableId(source.sourceRepo) || "";
|
|
3786
3787
|
}
|
|
3787
3788
|
function joinsTableChip(source) {
|
|
3788
|
-
|
|
3789
|
-
return groupsByTable(typeOf({ ...source, sourceRepo: source.sourceRepo }));
|
|
3789
|
+
return !!source.sourceRepo;
|
|
3790
3790
|
}
|
|
3791
3791
|
function rowsOf(source) {
|
|
3792
3792
|
if (isGroupedChip(source)) return source.items ?? [];
|
|
@@ -6529,4 +6529,4 @@ function pathMatchesAny(pathname, patterns) {
|
|
|
6529
6529
|
return (patterns ?? []).some((pattern) => matchesPathPattern(pathname, pattern));
|
|
6530
6530
|
}
|
|
6531
6531
|
|
|
6532
|
-
export { ACTIVE_ANCHOR_ATTRIBUTE, AI_PROVIDERS, ANTHROPIC_SUPPORTED_IMAGE_MIME, AUTO_CONTINUATION_DIRECTIVE_PREFIX, BADGE_PALETTE, BITE_ID_RE, BRAND_MARK_SVGS, CHAT_ATTACHMENT_MARKDOWN_PATTERN, CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM, CHAT_ATTACHMENT_VIEW_URL_PREFIX, CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED, COMPLIANCE_STANDARDS, CONTENT_REF_GROUPS, CSV_CONTENT_TYPE, CUSTOM_ITEM_ID, DEFAULT_CONTENT_SUFFIXES, DEFAULT_FOLDER_INDEX_FILE, DEFAULT_MIN_FILL_MS, DEFAULT_OS_PLATFORM, DELIVERY_TASK_TYPE_OPTIONS, DESIGN_DOC_READINESS, DESIGN_DOC_READINESS_DISPLAY, DESIGN_PALETTE, DESKTOP_OSES, DEV_SECTION_PARAM_KEYS, DOC_TABLE_TYPES, DOWNLOAD_PAGE_PATH, ELAPSED_MS_FIELD, EMBED_PROXY_OPTIONAL_HEADERS, FIRST_TOUCH_ATTRIBUTION_KEY, FORM_DRAFT_STATUSES, FORM_RESCUE_ATTEMPT_FIELD, FORM_RESCUE_DEBOUNCE_MS, FORM_RESCUE_EVENTS, FORM_RESCUE_MAX_FIELDS, FORM_RESCUE_MAX_VALUE_CHARS, FORM_RESCUE_RESUME_FIELD, FORM_RESCUE_RESUME_PARAM, FORM_RESCUE_SKIP_REASONS, FORM_RESCUE_SUBMIT_KEYS, FORM_RESCUE_VALUE_FIELDS, FullscreenSwitchController, GENERIC_EMAIL_DOMAINS, HEADING_EMOJI_RE, HEX_PATTERN, HONEYPOT_FIELD, HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, HUB_HEADER_OFFSET_PX, HUMANITY_SIGNAL_KEYS, ICON_REGISTRY, IMAGE_FILE_ACCEPT, LOCATION_HASH_SYNC_EVENT, MAX_MONTH_OFFSET, MEDIA_FILE_ACCEPT, MEDIA_TYPE, NO_CLIENT_CACHE, ODS_SPACING_PROPS, ODS_SPACING_TOKENS, ODS_SPACING_TOKEN_PATTERN, ODS_STEM_CLASSES, ODS_STEM_TOKENS, OPENFRAME_CLASSIFICATIONS, OPENFRAME_DEV_SECTIONS, OS_PLATFORMS, PAGE_PARAM_LIMITS, PLATFORM_BRAND, PLATFORM_SURFACE, PLATFORM_THEME, PLAY_ICON_PATH, PROGRAM_META_RENDERERS, RESCUE_FORMS, ROADMAP_STATUS_OPTIONS, SCHEDULING_SLUG_SHAPE, SCROLL_ANCHOR, SCROLL_ANCHOR_WIRE_KEY, SECTION_HERO_ICON_CLASS, SEO_DESCRIPTION_MAX_LENGTH, SEO_TITLE_MAX_LENGTH, SOCIAL_PLATFORM_ALIASES, SOCIAL_PLATFORM_ALT_HOSTS, SOURCE_ICON_NAMES, SOURCE_LABELS_BY_TABLE, STICKY_HEADER_OFFSET_PX, TAILWIND_STEP_TO_ODS_TOKEN, TICKET_OPEN_PARAM, TICKET_STATUS_OPTIONS, TOKEN_RATE_EMPTY,
|
|
6532
|
+
export { ACTIVE_ANCHOR_ATTRIBUTE, AI_PROVIDERS, ANTHROPIC_SUPPORTED_IMAGE_MIME, AUTO_CONTINUATION_DIRECTIVE_PREFIX, BADGE_PALETTE, BITE_ID_RE, BRAND_MARK_SVGS, CHAT_ATTACHMENT_MARKDOWN_PATTERN, CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM, CHAT_ATTACHMENT_VIEW_URL_PREFIX, CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED, COMPLIANCE_STANDARDS, CONTENT_REF_GROUPS, CSV_CONTENT_TYPE, CUSTOM_ITEM_ID, DEFAULT_CONTENT_SUFFIXES, DEFAULT_FOLDER_INDEX_FILE, DEFAULT_MIN_FILL_MS, DEFAULT_OS_PLATFORM, DELIVERY_TASK_TYPE_OPTIONS, DESIGN_DOC_READINESS, DESIGN_DOC_READINESS_DISPLAY, DESIGN_PALETTE, DESKTOP_OSES, DEV_SECTION_PARAM_KEYS, DOC_TABLE_TYPES, DOWNLOAD_PAGE_PATH, ELAPSED_MS_FIELD, EMBED_PROXY_OPTIONAL_HEADERS, FIRST_TOUCH_ATTRIBUTION_KEY, FORM_DRAFT_STATUSES, FORM_RESCUE_ATTEMPT_FIELD, FORM_RESCUE_DEBOUNCE_MS, FORM_RESCUE_EVENTS, FORM_RESCUE_MAX_FIELDS, FORM_RESCUE_MAX_VALUE_CHARS, FORM_RESCUE_RESUME_FIELD, FORM_RESCUE_RESUME_PARAM, FORM_RESCUE_SKIP_REASONS, FORM_RESCUE_SUBMIT_KEYS, FORM_RESCUE_VALUE_FIELDS, FullscreenSwitchController, GENERIC_EMAIL_DOMAINS, HEADING_EMOJI_RE, HEX_PATTERN, HONEYPOT_FIELD, HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, HUB_HEADER_OFFSET_PX, HUMANITY_SIGNAL_KEYS, ICON_REGISTRY, IMAGE_FILE_ACCEPT, LOCATION_HASH_SYNC_EVENT, MAX_MONTH_OFFSET, MEDIA_FILE_ACCEPT, MEDIA_TYPE, NO_CLIENT_CACHE, ODS_SPACING_PROPS, ODS_SPACING_TOKENS, ODS_SPACING_TOKEN_PATTERN, ODS_STEM_CLASSES, ODS_STEM_TOKENS, OPENFRAME_CLASSIFICATIONS, OPENFRAME_DEV_SECTIONS, OS_PLATFORMS, PAGE_PARAM_LIMITS, PLATFORM_BRAND, PLATFORM_SURFACE, PLATFORM_THEME, PLAY_ICON_PATH, PROGRAM_META_RENDERERS, RESCUE_FORMS, ROADMAP_STATUS_OPTIONS, SCHEDULING_SLUG_SHAPE, SCROLL_ANCHOR, SCROLL_ANCHOR_WIRE_KEY, SECTION_HERO_ICON_CLASS, SEO_DESCRIPTION_MAX_LENGTH, SEO_TITLE_MAX_LENGTH, SOCIAL_PLATFORM_ALIASES, SOCIAL_PLATFORM_ALT_HOSTS, SOURCE_ICON_NAMES, SOURCE_LABELS_BY_TABLE, STICKY_HEADER_OFFSET_PX, TAILWIND_STEP_TO_ODS_TOKEN, TICKET_OPEN_PARAM, TICKET_STATUS_OPTIONS, TOKEN_RATE_EMPTY, TRIAL_TERMS, VENDOR_CLASSIFICATIONS, VIEWER_TIMEZONE, WALKTHROUGH_OPEN_QUERY_PARAM, WALKTHROUGH_VIDEO_DISMISS_KEY, aiProvider, analyzeImageColor, announcementDismissCookieName, applyProxyAuth, brandMarkDataUri, buildAutoContinuationDirective, buildChatAttachmentViewUrl, buildDefaultHref, buildDiscussAddendum, buildDocumentTree, buildGroupedSource, buildListUrl, buildOgPlaceholderUrl, buildSuggestionUrl, buildTicketOpenHref, canonicalContentRefType, captureFirstTouchAttribution, captureFormRescueEvent, clamp, clampPageToTotal, classifySocialHost, cleanEmailDomain, clearAnnouncementDismissals, clearDismissCookie, clearEmbedProxyAuth, clearFirstTouchAttribution, clearLegacyAnnouncementCache, clearWalkthroughDismissal, clickupTaskUrl, cn, complianceStandardForName, consumeAccessCode, copyrightLine, createFenceTracker, createHeadingIdDeduper, createSearchParams, createSseSubscription, createUTCTimestamp, csvEscape, deepClone, defineParamSchema, defineRescueForm, delay, deriveActiveColor, deriveHoverColor, designDocReadiness, desktopOsOf, detectDesktopOs, detectVisitorOs, devSectionAnchorId, dismissAnnouncement, dismissWalkthrough, embedAuthedFetch, ensureBiteIds, errorMessage, escapeMarkdownInline, escapeRegExp, evaluateHumanitySignals, eventAudience, extractCardItems, extractDomainFromEmail, extractDominantColor, extractEntityIdFilter, extractHumanitySignals, extractImageEdgeColorAsync, extractItemId, extractItems, extractSections, faqItemAnchor, faqSectionSlug, fetchPriorityProp, fileContentKey, fileMediaType, filledRescueFields, findAnchorElementByNormalizedId, findDocNodeByPath, findHoneypotCopySource, firstParamValue, flattenAssistantContent, formatAbbreviatedNumber, formatAbsoluteDate, formatBioText, formatBytes, formatBytesShort, formatChatAttachmentMarkdownForBubble, formatCitationIndices, formatClassification, formatCompactMetric, formatCompletionLabel, formatCompletionLabelWithBlockers, formatCurrency, formatDate, formatDateRange, formatDateShort, formatDateSlashUTC, formatDateTime, formatDateTimeAt, formatDateTimeYmd, formatDateUTC, formatDateWithTimezone, formatDocName, formatDuration, formatDurationCompact, formatDurationFromMs, formatDurationFromRange, formatDurationMMSS, formatEntryMonthUTC, formatFileSize, formatLargeNumber, formatLegalDate, formatNumber, formatPercent, formatPhoneE164, formatPrice, formatPricingModel, formatProgramDate, formatProgramDateRange, formatProgramTimeRange, formatRelativeTime, formatReleaseDate, formatSingularLookupInvocation, formatTicketFullTimestamp, formatTicketRelativeTime, formatTimeWithTimezone, formatTokenAmount, formatTokenRate, formatUnderscoreText, formatUrlForDisplay, formatWebinarTimeMeta, formatWholeDollars, fromKeys, generateBiteId, generateImageSizes, generateRandomString, getAllPlatformBaseDomains, getBestContrastColor, getConfidenceBgClass, getConfidenceBorderClass, getConfidenceColorClass, getConfidenceLabel, getConfidenceLevel, getConfidenceTextClass, getContentRefLabel, getContentRefLabelOrTitleCase, getContrastRatio, getCountryByCode, getCountryByName, getCountryPhoneData, getCurrentPlatform, getDefaultColorForPlatform, getDefaultIconForPlatform, getDeploymentUrl, getDetailedTimeDifference, getDocAncestorNodeIds, getDocSourceDefaultPath, getDynamicIcon, getEmbedProxyAuth, getFirstTouchAttribution, getFlagFromCountryName, getIconComponent, getInitialExpandedNodeIds, getOSIcon, getOSLabel, getOSPlatformId, getOSTypeDefinition, getPersistedProxyEmail, getPlatformAccentColor, getPlatformBackgroundVarName, getPlatformBrand, getPlatformBrandClasses, getPlatformColor, getPlatformConfig, getPlatformDescription, getPlatformDisplayName, getPlatformIcon, getPlatformIconComponent, getPlatformIconComponent as getPlatformLogo, getPlatformProductionUrl, getPlatformSecondaryColor, getPlatformShortName, getPlatformSlogan, getPlatformTextVarName, getPlatformUrl, getProxiedImageUrl, getReadableTextColor, getRequestOrigin, getRescueForm, getSemanticColor, getShellIcon, getShellLabel, getSlackCommunityJoinUrl, getSmallPlatformIcon, getSourceIconName, getSourceLabel, getStatusColorScheme, getTaskTypeLabel, getToolLabel, getToolTypeAliases, getTrendColors, groupSourcesByTable, groupTokenRatesByProvider, groupsByTable, hasGenericEmailDomain, hexToRgb2 as hexToRgb, hostMatches, isAnnouncementDismissed, isBadgePaletteKey, isBlankLine, isCrossOriginUrl, isDismissedCookieValue, isExcludedRescueField, isFigmaSlidesUrl, isFormAttemptId, isGenericDomain, isGenericWebsiteDomain, isHumanitySignalKey, isImageMedia, isListedSchedulingName, isLocalUrl, isOSPlatform, isOpenFrameClassification, isOrderedRange, isPublishableMediaType, isRescueEmail, isResumeToken, isScrollSyncedHash, isToday, isValidEmailDomain, isValidPathPattern, isValidSchedulingSlug, isValidToolType, isVendorClassification, isVideoMedia, isWalkthroughDismissed, isWithinMinutes, listRescueForms, makeComposeContentUrl, markdownToPlainText, matchBiteElement, matchesPathPattern, mediaNameKey, nameInitials, navigateSamePageHash, normalizeAnchorId, normalizeDocPath, normalizeDomain, normalizeHashFragment, normalizeIconKey, normalizeOSType, normalizeSchedulingSlug, normalizeSocialPlatform, normalizeToolType, normalizeToolTypeWithFallback, openInNewTab, orderContentRefTypes, pageCount, parseAttributionFromUrl, parseFaqHash, parseFormDraftSaveRequest, parseSchedulingLinkName, parseSchemaParams, parseScrollAnchor, parseWireCommandOverride, partitionMediaByType, pathMatchesAny, pathToNodeId, personFirstName, personInitials, pick, pickBadgePaletteColor, pickReadableTextColor, pickSocialLink, platformAccentToken, platformAccentVarName, platformColors, platformDescriptions, platformDisplayNames, platformHexColors, platformIconNames, platformIcons, platformSecondaryToken, platformSecondaryVarName, platformShortNames, platformSlogans, positiveInt, programDateInstant, programMetaFormatters, programMetaLine, programStr, readDismissCookie, readLeadingDecisionFrame, recordCountLabel, releaseTypeToBadgeColor, replaceLocationHash, rescueCompletionPct, resolveContentFetchPath, resolveMobileStoreUrl, resolveRedirectTarget, resolveReleaseCover, rgbToHex, sanitizeLandingUrl, sanitizeRescueFieldName, sanitizeRescueValues, sanitizeTitleForChat, scanHeadings, schedulingAudienceKey, scrollElementIntoView, serializeJsonLd, serializeSchemaParams, setEmbedAuthAdapter, setEmbedProxyAuth, shortcutLabel, shouldIncludeInUrl, shouldProxyImage, singleInitial, skipsImageOptimizer, slugifyHeadingBase, slugifyHeadingText, socialPlatformHosts, sortTreeChildren, splitCsvEnv, stripChatAttachmentMarkdown, stripFolderIndexFromPath, stripHeadingEmojis, stripHtml, stripInlineMarkdown, switchPlatformTheme, titleCaseFromSlug, toClaudeEmbedUrl, toClaudeMirrorPath, toCsv, toDocSlug, toFigmaEmbedUrl, toFigmaOriginalUrl, toGoogleSheetsEmbedUrl, toGoogleSheetsOriginalUrl, toToolLabel, tokenCost, tokenRateProviderLabel, tokensForBalance, transformPlatformConfigsToOptions, trialLabels, trialLengthLabel, truncateString, urlPathLooksLikeSvg, usePlatformColors, usesCommandKey, validateAccessCode, validateAndConsumeAccessCode, validateEmailDomain, validateEmailDomainList, validatePhoneNumber, walkthroughDismissCookieName, webinarTiming, withFirstTouchAttribution, withQuery, withWalkthroughOpenParam, writeDismissCookie };
|
|
@@ -25,13 +25,22 @@ import type { ChatSource } from '../components/chat/types/message.types';
|
|
|
25
25
|
/**
|
|
26
26
|
* Doc-table documentTypes: whole documents with their own viewer (markdown =
|
|
27
27
|
* product docs, data_room_doc = data room). They carry an in-app `path`, an
|
|
28
|
-
* embedder keys `docPlatformTargets` by them, and
|
|
29
|
-
*
|
|
28
|
+
* embedder keys `docPlatformTargets` by them, and a server never folds them
|
|
29
|
+
* into one citation (`groupsByTable`); the strip still draws them as one chip
|
|
30
|
+
* per table. The hub's per-source contract test pins this list to its
|
|
30
31
|
* doc-table configs.
|
|
31
32
|
*/
|
|
32
33
|
export declare const DOC_TABLE_TYPES: readonly ["markdown", "data_room_doc"];
|
|
33
|
-
/**
|
|
34
|
-
*
|
|
34
|
+
/**
|
|
35
|
+
* Which tables a SERVER folds into one citation: rows of a knowledge table
|
|
36
|
+
* share one number (and reach the model as one table) unless they are whole
|
|
37
|
+
* documents, which each keep their own number and are read in full. Decided by
|
|
38
|
+
* `documentType`, the one fact every producer has.
|
|
39
|
+
*
|
|
40
|
+
* This is not the strip's rule. The strip (`groupSourcesByTable`) draws ONE chip
|
|
41
|
+
* per table for every source, documents included: a document keeps its own
|
|
42
|
+
* citation number inside its table's chip.
|
|
43
|
+
*/
|
|
35
44
|
export declare function groupsByTable(documentType: string | null | undefined): boolean;
|
|
36
45
|
/** `(1 record)` / `(14 records)`: the count every grouped chip states. */
|
|
37
46
|
export declare function recordCountLabel(count: number): string;
|
|
@@ -71,7 +80,8 @@ export declare function buildGroupedSource(spec: {
|
|
|
71
80
|
* table's only source. When flat rows of the same table arrive beside it (a
|
|
72
81
|
* hub-injected chip plus MCP-cited rows in one answer), they merge into it:
|
|
73
82
|
* its rows first, its chip-level link kept, the count restated. Whole
|
|
74
|
-
* documents
|
|
83
|
+
* documents group under their table too, each row keeping its own citation
|
|
84
|
+
* number; only a row naming no table passes through as its own chip.
|
|
75
85
|
*/
|
|
76
86
|
export declare function groupSourcesByTable(sources: ChatSource[]): ChatSource[];
|
|
77
87
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-grouping.d.ts","sourceRoot":"","sources":["../../src/utils/source-grouping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGzE
|
|
1
|
+
{"version":3,"file":"source-grouping.d.ts","sourceRoot":"","sources":["../../src/utils/source-grouping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGzE;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,wCAAyC,CAAC;AAEtE;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE9E;AAED,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,KAAK,WAAW,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D;2EAC2E;AAC3E,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAE3C;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,gBAAgB,EAAE,CAAC;IACzB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,GAAG,UAAU,CAcb;AA0DD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,CAqCvE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAU/D"}
|
package/dist/utils/trial.d.ts
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* The words every surface states the free trial with: the sign-up panel here,
|
|
3
|
+
* and the host site's trial buttons, trust rows and pricing copy.
|
|
4
|
+
*
|
|
5
|
+
* The trial's LENGTH is not stated here. It is the billing plan's, so a host
|
|
6
|
+
* passes the number it read from its server (`trialLabels(days)`); with no
|
|
7
|
+
* number the length is left out, never guessed.
|
|
5
8
|
*
|
|
6
9
|
* Server-safe (no React, no DOM).
|
|
7
10
|
*/
|
|
8
|
-
/**
|
|
9
|
-
export declare const
|
|
10
|
-
/** The reassurance labels shown beside a trial button. */
|
|
11
|
-
export declare const TRIAL_LABELS: {
|
|
12
|
-
/** "14 day free trial" */
|
|
13
|
-
readonly length: "14 day free trial";
|
|
11
|
+
/** The reassurance labels that hold whatever the trial's length is. */
|
|
12
|
+
export declare const TRIAL_TERMS: {
|
|
14
13
|
readonly noCard: "No card required";
|
|
15
14
|
readonly cancel: "Cancel Anytime";
|
|
16
15
|
readonly noContract: "No Contract";
|
|
17
16
|
};
|
|
17
|
+
/** "30 day free trial", from the length the billing plan states. A string is a template slot (`{trialDays}`). */
|
|
18
|
+
export declare const trialLengthLabel: (days: number | string) => string;
|
|
19
|
+
/** The labels shown beside a trial button. `length` is null while the plan's length is not known. */
|
|
20
|
+
export declare function trialLabels(days: number | string | null | undefined): {
|
|
21
|
+
length: string | null;
|
|
22
|
+
noCard: "No card required";
|
|
23
|
+
cancel: "Cancel Anytime";
|
|
24
|
+
noContract: "No Contract";
|
|
25
|
+
};
|
|
18
26
|
//# sourceMappingURL=trial.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trial.d.ts","sourceRoot":"","sources":["../../src/utils/trial.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"trial.d.ts","sourceRoot":"","sources":["../../src/utils/trial.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,uEAAuE;AACvE,eAAO,MAAM,WAAW;;;;CAId,CAAC;AAEX,iHAAiH;AACjH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,GAAG,MAAM,KAAG,MAAkC,CAAC;AAE5F,qGAAqG;AACrG,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;EAEnE"}
|
package/package.json
CHANGED
|
@@ -1,74 +1,119 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
3
|
import {
|
|
5
4
|
AssistantRuntimeContext,
|
|
6
5
|
useAssistantRuntime,
|
|
7
6
|
type AssistantOpenRequest,
|
|
8
7
|
} from '../../contexts/assistant-runtime-context';
|
|
9
|
-
import { AskPrompts, type AskPromptsProps } from './ask-prompts';
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
8
|
+
import { AskCard, AskPrompts, type AskPromptsProps } from './ask-prompts';
|
|
9
|
+
import { assistantAvailable, ASK_PROMPTS_DEFAULT_COUNT, useAskSurface } from './hooks/use-ask-prompts';
|
|
10
|
+
|
|
11
|
+
/** The lib's own wording of the card, when neither the host nor the runtime states it. */
|
|
12
|
+
const DEFAULT_ASK_CARD = {
|
|
13
|
+
title: 'Still deciding?',
|
|
14
|
+
description: '{assistant} answers from our docs and customer stories.',
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
const fillAssistant = (text: string, name: string) => text.split('{assistant}').join(name);
|
|
17
18
|
|
|
18
19
|
export interface AssistantAskPromptsProps extends Pick<AskPromptsProps, 'align' | 'fadeColor' | 'className'> {
|
|
19
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* How the surface looks. `row` (default): the launcher, then the questions,
|
|
22
|
+
* for a page section. `card`: the "still deciding?" card beside a list of
|
|
23
|
+
* questions (a FAQ), with a title, a line of description and the launcher.
|
|
24
|
+
*/
|
|
25
|
+
variant?: 'row' | 'card';
|
|
26
|
+
/** What this surface is about: any string the host's questions endpoint knows. Reported with every click. */
|
|
20
27
|
topic?: string;
|
|
21
|
-
/** How many questions
|
|
28
|
+
/** How many questions it offers: the same number of slots on every load. Absent: three (a card: the runtime's, else three). */
|
|
22
29
|
count?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Ids of questions never to offer. Absent: the ones the page's other "ask"
|
|
32
|
+
* surfaces show, which this one waits for. `null`: wait.
|
|
33
|
+
*/
|
|
34
|
+
exclude?: readonly string[] | null;
|
|
35
|
+
/** False: the surface does not pick yet (its host is waiting for it to be reached). Default true. */
|
|
36
|
+
enabled?: boolean;
|
|
23
37
|
/** The launcher's name. Absent: the assistant's configured name, else the launcher's default. */
|
|
24
38
|
label?: string;
|
|
25
|
-
/** Something else the
|
|
39
|
+
/** Something else the surface waits for (the host is still reading the name it will show). */
|
|
26
40
|
loading?: boolean;
|
|
27
|
-
/**
|
|
41
|
+
/** A card's wording. `{assistant}` is replaced by the assistant's name. Absent: the runtime's, else the lib's. */
|
|
42
|
+
title?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
/** How the chat is opened from THIS surface. Absent: the assistant runtime's opener. */
|
|
28
45
|
onOpen?: (request: AssistantOpenRequest) => void;
|
|
29
46
|
}
|
|
30
47
|
|
|
31
48
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
49
|
+
* THE "ask the assistant" surface, wired by itself: a row of questions in a
|
|
50
|
+
* page section, or the card beside a FAQ (`variant`). Everything comes from
|
|
51
|
+
* the nearest assistant runtime (`AssistantRuntimeContext`) through ONE hook,
|
|
52
|
+
* `useAskSurface`: whether a chat is there, the identity, the questions the
|
|
53
|
+
* host picked for this surface's `topic`, the opener and the click report.
|
|
54
|
+
* Surfaces of one page pick one after another and never show a question
|
|
55
|
+
* another already shows, so two of them may share a topic. While a pick is on
|
|
56
|
+
* its way the surface is the SAME block (a chip skeleton in every slot), so
|
|
57
|
+
* nothing moves when the questions land.
|
|
58
|
+
*
|
|
59
|
+
* Nothing renders with no chat. A row also renders nothing with no questions
|
|
60
|
+
* endpoint, or once its pick has settled empty; a card needs the assistant's
|
|
61
|
+
* name for its words, and with no endpoint is the launcher alone.
|
|
41
62
|
*/
|
|
42
63
|
export function AssistantAskPrompts({
|
|
64
|
+
variant = 'row',
|
|
43
65
|
topic,
|
|
44
|
-
count
|
|
66
|
+
count,
|
|
67
|
+
exclude,
|
|
68
|
+
enabled,
|
|
45
69
|
label,
|
|
46
70
|
loading = false,
|
|
71
|
+
title,
|
|
72
|
+
description,
|
|
47
73
|
onOpen,
|
|
48
74
|
align,
|
|
49
75
|
fadeColor,
|
|
50
76
|
className,
|
|
51
77
|
}: AssistantAskPromptsProps) {
|
|
78
|
+
const card = variant === 'card';
|
|
52
79
|
const assistant = useAssistantRuntime();
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
80
|
+
const slots = count ?? (card ? assistant?.askCard?.count : undefined) ?? ASK_PROMPTS_DEFAULT_COUNT;
|
|
81
|
+
const ask = useAskSurface({ topic, count: slots, exclude, enabled, onOpen });
|
|
82
|
+
if (!assistantAvailable(assistant)) return null;
|
|
83
|
+
|
|
84
|
+
const shared = {
|
|
85
|
+
prompts: ask.prompts,
|
|
86
|
+
loading: ask.isLoading || loading,
|
|
87
|
+
source: assistant.source,
|
|
88
|
+
icon: assistant.icon,
|
|
89
|
+
onOpen: ask.open,
|
|
90
|
+
onAsk: ask.reportAsk,
|
|
91
|
+
};
|
|
92
|
+
if (card) {
|
|
93
|
+
const name = label ?? assistant.name;
|
|
94
|
+
if (!name) return null;
|
|
95
|
+
const words = description ?? assistant.askCard?.description ?? DEFAULT_ASK_CARD.description;
|
|
96
|
+
return (
|
|
97
|
+
<AssistantRuntimeContext.Provider value={ask.scoped}>
|
|
98
|
+
<AskCard
|
|
99
|
+
{...shared}
|
|
100
|
+
title={fillAssistant(title ?? assistant.askCard?.title ?? DEFAULT_ASK_CARD.title, name)}
|
|
101
|
+
description={words ? fillAssistant(words, name) : undefined}
|
|
102
|
+
// Fixed slots, one question per row: chip skeletons until the pick lands, the same box after.
|
|
103
|
+
count={ask.supported ? slots : 0}
|
|
104
|
+
label={name}
|
|
105
|
+
className={className}
|
|
106
|
+
/>
|
|
107
|
+
</AssistantRuntimeContext.Provider>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
if (!ask.supported) return null;
|
|
61
111
|
return (
|
|
62
|
-
<AssistantRuntimeContext.Provider value={scoped}>
|
|
112
|
+
<AssistantRuntimeContext.Provider value={ask.scoped}>
|
|
63
113
|
<AskPrompts
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
count={count}
|
|
67
|
-
source={assistant.source}
|
|
114
|
+
{...shared}
|
|
115
|
+
count={slots}
|
|
68
116
|
label={label ?? assistant.name ?? undefined}
|
|
69
|
-
icon={assistant.icon}
|
|
70
|
-
onOpen={open}
|
|
71
|
-
onAsk={prompt => assistant.onAsk?.({ promptId: prompt.id, topic })}
|
|
72
117
|
align={align}
|
|
73
118
|
fadeColor={fadeColor}
|
|
74
119
|
className={className}
|
|
@@ -61,29 +61,14 @@ import { MingoIcon } from '../../icons';
|
|
|
61
61
|
import { ArrowRightUpIcon } from '../../icons-v2-generated/arrows/arrow-right-up-icon';
|
|
62
62
|
import { ClickupLogoIcon } from '../../icons-v2-generated/brand-logos/clickup-logo-icon';
|
|
63
63
|
import { SlackLogoGreyIcon } from '../../icons-v2-generated/brand-logos/slack-logo-grey-icon';
|
|
64
|
-
import { ChartBar01VerIcon } from '../../icons-v2-generated/charts/chart-bar-01-ver-icon';
|
|
65
|
-
import { ChartPieIcon } from '../../icons-v2-generated/charts/chart-pie-icon';
|
|
66
64
|
import { PresentationBarIcon } from '../../icons-v2-generated/charts/presentation-bar-icon';
|
|
67
65
|
import { PresentationLineIcon } from '../../icons-v2-generated/charts/presentation-line-icon';
|
|
68
|
-
import { BracketCurlyCheckIcon } from '../../icons-v2-generated/coding/bracket-curly-check-icon';
|
|
69
66
|
import { CodeIcon } from '../../icons-v2-generated/coding/code-icon';
|
|
70
|
-
import { CodeSquareIcon } from '../../icons-v2-generated/coding/code-square-icon';
|
|
71
|
-
import { CodingBranchIcon } from '../../icons-v2-generated/coding/coding-branch-icon';
|
|
72
67
|
import { CodingCommitIcon } from '../../icons-v2-generated/coding/coding-commit-icon';
|
|
73
|
-
import { CodingMergeIcon } from '../../icons-v2-generated/coding/coding-merge-icon';
|
|
74
68
|
import { CodingPullRequestIcon } from '../../icons-v2-generated/coding/coding-pull-request-icon';
|
|
75
|
-
import { PackageIcon } from '../../icons-v2-generated/coding/package-icon';
|
|
76
|
-
import { CallIcon } from '../../icons-v2-generated/communication/call-icon';
|
|
77
|
-
import { ChatQuoteIcon } from '../../icons-v2-generated/communication/chat-quote-icon';
|
|
78
69
|
import { CalendarIcon } from '../../icons-v2-generated/date-and-time/calendar-icon';
|
|
79
|
-
import { ClipboardListIcon } from '../../icons-v2-generated/documents/clipboard-list-icon';
|
|
80
|
-
import { Copy01Icon } from '../../icons-v2-generated/documents/copy-01-icon';
|
|
81
|
-
import { FileCodeIcon } from '../../icons-v2-generated/documents/file-code-icon';
|
|
82
70
|
import { FileContentIcon } from '../../icons-v2-generated/documents/file-content-icon';
|
|
83
71
|
import { NewspaperIcon } from '../../icons-v2-generated/documents/newspaper-icon';
|
|
84
|
-
import { BankIcon } from '../../icons-v2-generated/finance/bank-icon';
|
|
85
|
-
import { CoinsExchangeCurrencyIcon } from '../../icons-v2-generated/finance/coins-exchange-currency-icon';
|
|
86
|
-
import { MoneyBillDollarIcon } from '../../icons-v2-generated/finance/money-bill-dollar-icon';
|
|
87
72
|
import { MicrophoneIcon } from '../../icons-v2-generated/household/microphone-icon';
|
|
88
73
|
import { AlertTriangleIcon } from '../../icons-v2-generated/interface/alert-triangle-icon';
|
|
89
74
|
import { EyeIcon } from '../../icons-v2-generated/interface/eye-icon';
|
|
@@ -113,10 +98,9 @@ import { resolveCardDestination } from '../utils/card-destination';
|
|
|
113
98
|
import { resolveHrefForRuntime } from '../utils/chat-nav-resolution';
|
|
114
99
|
import { executeNavigation } from '../utils/execute-navigation';
|
|
115
100
|
import { clickupTaskUrl } from '../utils/external-app-urls';
|
|
116
|
-
import { resolveIcon } from '../utils/icon-library';
|
|
117
101
|
import { computeIsNewTab, buildAnchorProps } from '../utils/nav-anchor-props';
|
|
118
102
|
import { readFetchedCardTitle } from '../utils/resolve-fetched-card-href';
|
|
119
|
-
import { getSourceLabel, SOURCE_ICON_NAMES } from '../utils/source-icons';
|
|
103
|
+
import { defaultTableIdForDocumentType, getSourceLabel, SOURCE_ICON_NAMES } from '../utils/source-icons';
|
|
120
104
|
import { resolveSourceIcon, sourceRowCtxFromRuntime } from '../utils/source-row-cta';
|
|
121
105
|
import { BlockCard } from './block-card';
|
|
122
106
|
import { BlogCardSkeleton } from './blog-card';
|
|
@@ -1393,18 +1377,16 @@ function refHydratedEntry(
|
|
|
1393
1377
|
};
|
|
1394
1378
|
}
|
|
1395
1379
|
|
|
1380
|
+
/** The leading glyph carries the type signal (the badge pill is dropped); it is the SOURCE's icon (`sourceGlyph`). */
|
|
1396
1381
|
interface FinancialCardConfig {
|
|
1397
1382
|
label: string;
|
|
1398
|
-
/** Per-type leading glyph — carries the type signal now that the
|
|
1399
|
-
* badge pill is dropped. */
|
|
1400
|
-
icon: () => React.ReactNode;
|
|
1401
1383
|
}
|
|
1402
1384
|
const FINANCIAL_CARD_CONFIGS: Record<string, FinancialCardConfig> = {
|
|
1403
|
-
financial_kpi: { label: 'Financial KPI'
|
|
1404
|
-
cap_table: { label: 'Cap table entry'
|
|
1405
|
-
profit_loss: { label: 'P&L period'
|
|
1406
|
-
balance_sheet: { label: 'Balance sheet'
|
|
1407
|
-
cash_flow: { label: 'Cash flow'
|
|
1385
|
+
financial_kpi: { label: 'Financial KPI' },
|
|
1386
|
+
cap_table: { label: 'Cap table entry' },
|
|
1387
|
+
profit_loss: { label: 'P&L period' },
|
|
1388
|
+
balance_sheet: { label: 'Balance sheet' },
|
|
1389
|
+
cash_flow: { label: 'Cash flow' },
|
|
1408
1390
|
};
|
|
1409
1391
|
/** Expand a per-family config map into registry entries — ONE loop shell
|
|
1410
1392
|
* for every card family (financial, github, program, roadmap); adding a
|
|
@@ -1423,7 +1405,7 @@ function financialRegistryEntries(): Record<string, ChatCardRegistryEntry> {
|
|
|
1423
1405
|
refHydratedEntry(docType, cfg.label, (displayRef, opts) => (
|
|
1424
1406
|
<GenericFinancialChatCard
|
|
1425
1407
|
chatRef={displayRef}
|
|
1426
|
-
icon={
|
|
1408
|
+
icon={sourceGlyph(docType)}
|
|
1427
1409
|
isNewTab={opts.isNewTab}
|
|
1428
1410
|
discuss={opts.discuss}
|
|
1429
1411
|
/>
|
|
@@ -1463,11 +1445,13 @@ const GITHUB_CARD_CONFIGS: Record<string, GitHubCardConfig> = {
|
|
|
1463
1445
|
interface GlyphCardConfig {
|
|
1464
1446
|
label: string;
|
|
1465
1447
|
/**
|
|
1466
|
-
*
|
|
1467
|
-
*
|
|
1468
|
-
*
|
|
1448
|
+
* ONLY for a type whose records carry their own mark (a vendor's logo, a
|
|
1449
|
+
* page's menu icon): it is handed the hydrated ref and draws that mark.
|
|
1450
|
+
* Every other type leaves it out and gets its SOURCE's icon
|
|
1451
|
+
* (`sourceGlyph`): the one `SOURCE_ICON_NAMES` entry its chip draws too, so
|
|
1452
|
+
* a card and its chip can never show different icons.
|
|
1469
1453
|
*/
|
|
1470
|
-
icon
|
|
1454
|
+
icon?: (ref?: ChatRef) => React.ReactNode;
|
|
1471
1455
|
/**
|
|
1472
1456
|
* Video-bearing ref types: render the media card (cover from the ref's
|
|
1473
1457
|
* `metadata.videoPoster`, else the host's OG placeholder; the type label as the
|
|
@@ -1481,41 +1465,51 @@ interface GlyphCardConfig {
|
|
|
1481
1465
|
* (`/api/design-docs`, `/api/openframe-tenants`, `/api/prospect-calls` — ChatRef-shaped items,
|
|
1482
1466
|
* same preset as github / slack). Adding one = one line here + the
|
|
1483
1467
|
* `list-url.ts` builder + the `source-icons.ts` label / icon / type entries. */
|
|
1484
|
-
/** The OpenFrame logo every OpenFrame surface uses (the `openframe` icon name). */
|
|
1485
|
-
const OpenFrameGlyph = resolveIcon('openframe');
|
|
1486
1468
|
const REF_GLYPH_CARD_CONFIGS: Record<string, GlyphCardConfig> = {
|
|
1487
|
-
openframe_tenant: { label: 'OpenFrame tenant'
|
|
1488
|
-
prospect_call: { label: 'Prospect call',
|
|
1469
|
+
openframe_tenant: { label: 'OpenFrame tenant' },
|
|
1470
|
+
prospect_call: { label: 'Prospect call', media: true },
|
|
1489
1471
|
// Code intelligence (product-hub internal): the review rules a repository is
|
|
1490
1472
|
// held to, the repositories themselves, and one row per deployment
|
|
1491
1473
|
// environment. Glyph cards like their siblings — none of the three has a
|
|
1492
1474
|
// cover image, and a rule is read in the admin screen it links to.
|
|
1493
|
-
code_rule: { label: 'Code rule'
|
|
1494
|
-
code_repo: { label: 'Repository'
|
|
1495
|
-
code_deployment: { label: 'Deployment'
|
|
1475
|
+
code_rule: { label: 'Code rule' },
|
|
1476
|
+
code_repo: { label: 'Repository' },
|
|
1477
|
+
code_deployment: { label: 'Deployment' },
|
|
1496
1478
|
// The graph's own objects: one source file's public surface, one public
|
|
1497
1479
|
// symbol, a near-duplicate cluster, and a pull request's blast radius.
|
|
1498
1480
|
// Glyph cards for the same reason as their three siblings — none carries a
|
|
1499
1481
|
// cover image, and each links to the admin screen that renders it in full.
|
|
1500
|
-
code_file: { label: 'Code file'
|
|
1501
|
-
code_symbol: { label: 'Code symbol'
|
|
1502
|
-
code_duplicate: { label: 'Duplicate code'
|
|
1503
|
-
code_impact: { label: 'Change impact'
|
|
1482
|
+
code_file: { label: 'Code file' },
|
|
1483
|
+
code_symbol: { label: 'Code symbol' },
|
|
1484
|
+
code_duplicate: { label: 'Duplicate code' },
|
|
1485
|
+
code_impact: { label: 'Change impact' },
|
|
1504
1486
|
// A change set: pull requests across repositories declared as one change, with the ClickUp tasks and design
|
|
1505
1487
|
// docs its pull requests are attached to. ONE card for it wherever a set is shown (chat, a design doc's page).
|
|
1506
|
-
change_set: { label: 'Change set'
|
|
1488
|
+
change_set: { label: 'Change set' },
|
|
1507
1489
|
// A page of the public website (pricing, product, legal, and every page the navigation lists), read live
|
|
1508
1490
|
// from the data the page shows. A glyph card: a page has no cover of its own, and the card opens the page.
|
|
1509
1491
|
site_page: { label: 'Website page', icon: ref => <SitePageGlyph iconName={refText(ref, 'icon_name')} /> },
|
|
1510
1492
|
// What OpenFrame charges, read live from its billing: the plan in force, or one AI model's token exchange
|
|
1511
1493
|
// rate. A glyph card; it opens the pricing page.
|
|
1512
|
-
openframe_price: { label: 'OpenFrame price'
|
|
1494
|
+
openframe_price: { label: 'OpenFrame price' },
|
|
1513
1495
|
// A vendor (product) of the OpenMSP directory. A glyph card; it opens the vendor's page there.
|
|
1514
1496
|
vendor: { label: 'Vendor', icon: ref => <VendorGlyph title={ref?.title ?? ''} logoUrl={refText(ref, 'logo_url')} /> },
|
|
1515
1497
|
};
|
|
1498
|
+
/**
|
|
1499
|
+
* A card type's icon: its SOURCE's, resolved exactly as the source's chip
|
|
1500
|
+
* resolves it (`resolveSourceIcon` over `SOURCE_ICON_NAMES`). One name per
|
|
1501
|
+
* source, one resolver, so a card and its chip always match.
|
|
1502
|
+
*/
|
|
1503
|
+
function sourceGlyph(docType: string): React.ReactNode {
|
|
1504
|
+
const { Icon } = resolveSourceIcon({ sourceRepo: defaultTableIdForDocumentType(docType), documentType: docType });
|
|
1505
|
+
return <Icon className="size-6" />;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1516
1508
|
function refGlyphRegistryEntries(): Record<string, ChatCardRegistryEntry> {
|
|
1517
|
-
return registryEntries(REF_GLYPH_CARD_CONFIGS, (
|
|
1518
|
-
|
|
1509
|
+
return registryEntries(REF_GLYPH_CARD_CONFIGS, (config, docType) => {
|
|
1510
|
+
const glyph = config.icon ?? (() => sourceGlyph(docType));
|
|
1511
|
+
const cfg = config;
|
|
1512
|
+
return refHydratedEntry(docType, cfg.label, (displayRef, opts) =>
|
|
1519
1513
|
cfg.media ? (
|
|
1520
1514
|
<EntityMingoCard
|
|
1521
1515
|
title={displayRef.title}
|
|
@@ -1524,7 +1518,7 @@ function refGlyphRegistryEntries(): Record<string, ChatCardRegistryEntry> {
|
|
|
1524
1518
|
displayRef.metadata?.videoPoster,
|
|
1525
1519
|
opts.extras?.buildOgPlaceholderUrl?.(displayRef.title ?? '') ?? null,
|
|
1526
1520
|
)}
|
|
1527
|
-
fallbackIcon={
|
|
1521
|
+
fallbackIcon={glyph(displayRef)}
|
|
1528
1522
|
status={{ label: cfg.label, variant: 'grey' }}
|
|
1529
1523
|
chatRef={displayRef}
|
|
1530
1524
|
isNewTab={opts.isNewTab}
|
|
@@ -1532,15 +1526,10 @@ function refGlyphRegistryEntries(): Record<string, ChatCardRegistryEntry> {
|
|
|
1532
1526
|
menuAriaLabel={`${cfg.label} actions`}
|
|
1533
1527
|
/>
|
|
1534
1528
|
) : (
|
|
1535
|
-
<GlyphChatCard
|
|
1536
|
-
chatRef={displayRef}
|
|
1537
|
-
icon={cfg.icon(displayRef)}
|
|
1538
|
-
isNewTab={opts.isNewTab}
|
|
1539
|
-
discuss={opts.discuss}
|
|
1540
|
-
/>
|
|
1529
|
+
<GlyphChatCard chatRef={displayRef} icon={glyph(displayRef)} isNewTab={opts.isNewTab} discuss={opts.discuss} />
|
|
1541
1530
|
),
|
|
1542
|
-
)
|
|
1543
|
-
);
|
|
1531
|
+
);
|
|
1532
|
+
});
|
|
1544
1533
|
}
|
|
1545
1534
|
|
|
1546
1535
|
/** People-hub employee feeds hydrate from their EXISTING list APIs
|
|
@@ -1558,9 +1547,9 @@ function fetchedEmployeeEntryDisplayRef(item: unknown, chatRef: ChatRef): ChatRe
|
|
|
1558
1547
|
return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
|
|
1559
1548
|
}
|
|
1560
1549
|
const EMPLOYEE_ENTRY_CARD_CONFIGS: Record<string, GlyphCardConfig> = {
|
|
1561
|
-
what_i_shipped: { label: 'What I Shipped'
|
|
1562
|
-
how_i_work: { label: 'How I Work'
|
|
1563
|
-
ai_prompt: { label: 'Squawkbox'
|
|
1550
|
+
what_i_shipped: { label: 'What I Shipped' },
|
|
1551
|
+
how_i_work: { label: 'How I Work' },
|
|
1552
|
+
ai_prompt: { label: 'Squawkbox' },
|
|
1564
1553
|
};
|
|
1565
1554
|
function employeeEntryRegistryEntries(): Record<string, ChatCardRegistryEntry> {
|
|
1566
1555
|
return registryEntries(EMPLOYEE_ENTRY_CARD_CONFIGS, (cfg, docType) => ({
|
|
@@ -1571,7 +1560,7 @@ function employeeEntryRegistryEntries(): Record<string, ChatCardRegistryEntry> {
|
|
|
1571
1560
|
render: (item, chatRef, opts) => (
|
|
1572
1561
|
<GlyphChatCard
|
|
1573
1562
|
chatRef={fetchedEmployeeEntryDisplayRef(item, chatRef)}
|
|
1574
|
-
icon={
|
|
1563
|
+
icon={sourceGlyph(docType)}
|
|
1575
1564
|
isNewTab={opts.isNewTab}
|
|
1576
1565
|
discuss={opts.discuss}
|
|
1577
1566
|
/>
|
|
@@ -45,9 +45,10 @@ export {
|
|
|
45
45
|
buildAskPromptsUrl,
|
|
46
46
|
useAskPrompts,
|
|
47
47
|
useAssistantOpen,
|
|
48
|
-
|
|
49
|
-
useShownAskPrompts,
|
|
48
|
+
useAskSurface,
|
|
50
49
|
type AskPromptsResponse,
|
|
51
50
|
type UseAskPromptsOptions,
|
|
52
51
|
type UseAskPromptsResult,
|
|
52
|
+
type UseAskSurfaceOptions,
|
|
53
|
+
type UseAskSurfaceResult,
|
|
53
54
|
} from './use-ask-prompts';
|