@flamingo-stack/openframe-frontend-core 0.0.647 → 0.0.648-snapshot.20260917211410

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/chat-protocol/index.cjs.map +1 -1
  2. package/dist/chat-protocol/index.js.map +1 -1
  3. package/dist/{chunk-RXIFYEL7.js → chunk-4OAG7752.js} +5 -5
  4. package/dist/{chunk-MKGAIWQ5.cjs → chunk-742HTNAE.cjs} +3 -3
  5. package/dist/{chunk-MKGAIWQ5.cjs.map → chunk-742HTNAE.cjs.map} +1 -1
  6. package/dist/{chunk-IBTOED4M.cjs → chunk-C3CJJC2A.cjs} +7 -7
  7. package/dist/{chunk-IBTOED4M.cjs.map → chunk-C3CJJC2A.cjs.map} +1 -1
  8. package/dist/{chunk-ZNSBWM2D.js → chunk-C4VPCRSI.js} +4 -4
  9. package/dist/{chunk-RUEVZAPN.js → chunk-CZVFFD3P.js} +5 -5
  10. package/dist/{chunk-V33TSVUR.js → chunk-DVD4CMKB.js} +3 -3
  11. package/dist/{chunk-ABVOAYYS.cjs → chunk-EDDAU2BP.cjs} +44 -44
  12. package/dist/{chunk-ABVOAYYS.cjs.map → chunk-EDDAU2BP.cjs.map} +1 -1
  13. package/dist/{chunk-SS2RN4TU.cjs → chunk-EUGIXBAC.cjs} +13 -24
  14. package/dist/chunk-EUGIXBAC.cjs.map +1 -0
  15. package/dist/{chunk-IKMETQWQ.js → chunk-H6ND7FKB.js} +5 -5
  16. package/dist/{chunk-H3EJDISW.js → chunk-IEM2Z6K6.js} +10 -2
  17. package/dist/chunk-IEM2Z6K6.js.map +1 -0
  18. package/dist/{chunk-VXG43NJD.js → chunk-J2T3XDZX.js} +4 -4
  19. package/dist/{chunk-QPAQEPA3.js → chunk-J5VVA2KW.js} +2 -2
  20. package/dist/{chunk-AKM4AIZY.cjs → chunk-JYFCKQ2K.cjs} +22 -22
  21. package/dist/{chunk-AKM4AIZY.cjs.map → chunk-JYFCKQ2K.cjs.map} +1 -1
  22. package/dist/{chunk-T7NBMDDE.js → chunk-KQGTQXG2.js} +2 -2
  23. package/dist/{chunk-YCSYKAT2.cjs → chunk-KUCBDDQB.cjs} +248 -248
  24. package/dist/{chunk-YCSYKAT2.cjs.map → chunk-KUCBDDQB.cjs.map} +1 -1
  25. package/dist/{chunk-5XBO6URE.cjs → chunk-M2FFL6OG.cjs} +25 -25
  26. package/dist/{chunk-5XBO6URE.cjs.map → chunk-M2FFL6OG.cjs.map} +1 -1
  27. package/dist/{chunk-DLJHXLFG.js → chunk-MAFPT6GS.js} +6 -6
  28. package/dist/{chunk-ASPNYVGE.cjs → chunk-MB33V5S6.cjs} +51 -51
  29. package/dist/{chunk-ASPNYVGE.cjs.map → chunk-MB33V5S6.cjs.map} +1 -1
  30. package/dist/{chunk-ERLGZPCY.js → chunk-MXGGYW2R.js} +7 -7
  31. package/dist/{chunk-EG3PA7L2.cjs → chunk-N72F2XWZ.cjs} +10 -10
  32. package/dist/{chunk-EG3PA7L2.cjs.map → chunk-N72F2XWZ.cjs.map} +1 -1
  33. package/dist/{chunk-L6ES7O6B.js → chunk-O3B34KLC.js} +4 -4
  34. package/dist/{chunk-5YW3GAUR.cjs → chunk-OE6KUWRA.cjs} +424 -305
  35. package/dist/chunk-OE6KUWRA.cjs.map +1 -0
  36. package/dist/{chunk-DIGCERY4.js → chunk-OHNBWBZH.js} +7 -18
  37. package/dist/chunk-OHNBWBZH.js.map +1 -0
  38. package/dist/{chunk-VIAMEQM2.cjs → chunk-OWPMODYT.cjs} +5 -5
  39. package/dist/{chunk-VIAMEQM2.cjs.map → chunk-OWPMODYT.cjs.map} +1 -1
  40. package/dist/{chunk-DWJREJRA.cjs → chunk-PSXUY4K5.cjs} +10 -2
  41. package/dist/chunk-PSXUY4K5.cjs.map +1 -0
  42. package/dist/{chunk-TO4UY3P5.cjs → chunk-QFWZIXJ3.cjs} +75 -75
  43. package/dist/{chunk-TO4UY3P5.cjs.map → chunk-QFWZIXJ3.cjs.map} +1 -1
  44. package/dist/{chunk-GB2RYIVM.js → chunk-QG3ZNNKG.js} +2 -2
  45. package/dist/{chunk-5DCRDV7Y.js → chunk-QVAFZGCF.js} +7 -7
  46. package/dist/{chunk-N6ZYJXVJ.js → chunk-QVKRSUGB.js} +125 -6
  47. package/dist/chunk-QVKRSUGB.js.map +1 -0
  48. package/dist/{chunk-6Z4GSQPB.js → chunk-RHJ4NU3W.js} +2 -2
  49. package/dist/{chunk-RIOWS34T.js → chunk-UOOXFD74.js} +3 -3
  50. package/dist/{chunk-F4I46MKF.cjs → chunk-W554ING6.cjs} +12 -12
  51. package/dist/{chunk-F4I46MKF.cjs.map → chunk-W554ING6.cjs.map} +1 -1
  52. package/dist/{chunk-Q2XH3HW6.cjs → chunk-W7KFDHIU.cjs} +37 -37
  53. package/dist/{chunk-Q2XH3HW6.cjs.map → chunk-W7KFDHIU.cjs.map} +1 -1
  54. package/dist/{chunk-RSRYEVGZ.cjs → chunk-XIBBDYJK.cjs} +5 -5
  55. package/dist/{chunk-RSRYEVGZ.cjs.map → chunk-XIBBDYJK.cjs.map} +1 -1
  56. package/dist/{chunk-EZ6HGRLP.cjs → chunk-Y5EEPXT3.cjs} +33 -33
  57. package/dist/{chunk-EZ6HGRLP.cjs.map → chunk-Y5EEPXT3.cjs.map} +1 -1
  58. package/dist/{chunk-DBSU5RAE.cjs → chunk-YCBGEHWC.cjs} +3 -3
  59. package/dist/{chunk-DBSU5RAE.cjs.map → chunk-YCBGEHWC.cjs.map} +1 -1
  60. package/dist/components/case-studies/index.cjs +20 -20
  61. package/dist/components/case-studies/index.js +5 -5
  62. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  63. package/dist/components/chat/index.cjs +3 -3
  64. package/dist/components/chat/index.js +2 -2
  65. package/dist/components/chat/types/message.types.d.ts +5 -0
  66. package/dist/components/chat/types/message.types.d.ts.map +1 -1
  67. package/dist/components/chat/utils/cited-sources.d.ts +5 -0
  68. package/dist/components/chat/utils/cited-sources.d.ts.map +1 -1
  69. package/dist/components/chat/utils/source-row-cta.d.ts +2 -7
  70. package/dist/components/chat/utils/source-row-cta.d.ts.map +1 -1
  71. package/dist/components/contact/index.cjs +6 -6
  72. package/dist/components/contact/index.js +5 -5
  73. package/dist/components/docs/index.cjs +9 -9
  74. package/dist/components/docs/index.js +8 -8
  75. package/dist/components/embeds/index.cjs +6 -6
  76. package/dist/components/embeds/index.js +5 -5
  77. package/dist/components/faq/index.cjs +6 -6
  78. package/dist/components/faq/index.js +5 -5
  79. package/dist/components/features/index.cjs +5 -5
  80. package/dist/components/features/index.js +4 -4
  81. package/dist/components/help-center-pages/index.cjs +25 -25
  82. package/dist/components/help-center-pages/index.js +16 -16
  83. package/dist/components/icons/index.cjs +4 -2
  84. package/dist/components/icons/index.cjs.map +1 -1
  85. package/dist/components/icons/index.d.ts +1 -0
  86. package/dist/components/icons/index.d.ts.map +1 -1
  87. package/dist/components/icons/index.js +3 -1
  88. package/dist/components/icons/quickbooks-icon.d.ts +7 -0
  89. package/dist/components/icons/quickbooks-icon.d.ts.map +1 -0
  90. package/dist/components/index.cjs +44 -42
  91. package/dist/components/index.cjs.map +1 -1
  92. package/dist/components/index.js +17 -15
  93. package/dist/components/index.js.map +1 -1
  94. package/dist/components/meeting-scheduler/index.cjs +28 -28
  95. package/dist/components/meeting-scheduler/index.js +4 -4
  96. package/dist/components/navigation/index.cjs +8 -8
  97. package/dist/components/navigation/index.js +7 -7
  98. package/dist/components/onboarding-guides/index.cjs +8 -8
  99. package/dist/components/onboarding-guides/index.js +7 -7
  100. package/dist/components/shared/doc-search/map-doc-search-results.d.ts.map +1 -1
  101. package/dist/components/tickets/index.cjs +9 -9
  102. package/dist/components/tickets/index.js +8 -8
  103. package/dist/components/ui/index.cjs +5 -5
  104. package/dist/components/ui/index.js +4 -4
  105. package/dist/hooks/index.cjs +3 -3
  106. package/dist/hooks/index.js +2 -2
  107. package/dist/index.cjs +23 -9
  108. package/dist/index.cjs.map +1 -1
  109. package/dist/index.js +22 -8
  110. package/dist/index.js.map +1 -1
  111. package/dist/utils/index.cjs +163 -0
  112. package/dist/utils/index.cjs.map +1 -1
  113. package/dist/utils/index.d.ts +1 -0
  114. package/dist/utils/index.d.ts.map +1 -1
  115. package/dist/utils/index.js +158 -1
  116. package/dist/utils/index.js.map +1 -1
  117. package/dist/utils/source-grouping.d.ts +86 -0
  118. package/dist/utils/source-grouping.d.ts.map +1 -0
  119. package/dist/utils/source-icons.d.ts +7 -0
  120. package/dist/utils/source-icons.d.ts.map +1 -1
  121. package/package.json +1 -1
  122. package/src/components/chat/embeddable-chat.tsx +10 -2
  123. package/src/components/chat/types/message.types.ts +5 -0
  124. package/src/components/chat/utils/cited-sources.ts +7 -1
  125. package/src/components/chat/utils/source-row-cta.ts +4 -7
  126. package/src/components/icons/index.ts +1 -0
  127. package/src/components/icons/quickbooks-icon.tsx +13 -0
  128. package/src/components/shared/doc-search/__tests__/map-doc-search-results.test.ts +48 -0
  129. package/src/components/shared/doc-search/map-doc-search-results.ts +6 -16
  130. package/src/components/ui/markdown/__tests__/mermaid-zoom.test.tsx +2 -0
  131. package/src/utils/__tests__/source-grouping.test.ts +240 -0
  132. package/src/utils/index.ts +11 -0
  133. package/src/utils/source-grouping.ts +215 -0
  134. package/src/utils/source-icons.ts +13 -0
  135. package/dist/chunk-5YW3GAUR.cjs.map +0 -1
  136. package/dist/chunk-DIGCERY4.js.map +0 -1
  137. package/dist/chunk-DWJREJRA.cjs.map +0 -1
  138. package/dist/chunk-H3EJDISW.js.map +0 -1
  139. package/dist/chunk-N6ZYJXVJ.js.map +0 -1
  140. package/dist/chunk-SS2RN4TU.cjs.map +0 -1
  141. /package/dist/{chunk-RXIFYEL7.js.map → chunk-4OAG7752.js.map} +0 -0
  142. /package/dist/{chunk-ZNSBWM2D.js.map → chunk-C4VPCRSI.js.map} +0 -0
  143. /package/dist/{chunk-RUEVZAPN.js.map → chunk-CZVFFD3P.js.map} +0 -0
  144. /package/dist/{chunk-V33TSVUR.js.map → chunk-DVD4CMKB.js.map} +0 -0
  145. /package/dist/{chunk-IKMETQWQ.js.map → chunk-H6ND7FKB.js.map} +0 -0
  146. /package/dist/{chunk-VXG43NJD.js.map → chunk-J2T3XDZX.js.map} +0 -0
  147. /package/dist/{chunk-QPAQEPA3.js.map → chunk-J5VVA2KW.js.map} +0 -0
  148. /package/dist/{chunk-T7NBMDDE.js.map → chunk-KQGTQXG2.js.map} +0 -0
  149. /package/dist/{chunk-DLJHXLFG.js.map → chunk-MAFPT6GS.js.map} +0 -0
  150. /package/dist/{chunk-ERLGZPCY.js.map → chunk-MXGGYW2R.js.map} +0 -0
  151. /package/dist/{chunk-L6ES7O6B.js.map → chunk-O3B34KLC.js.map} +0 -0
  152. /package/dist/{chunk-GB2RYIVM.js.map → chunk-QG3ZNNKG.js.map} +0 -0
  153. /package/dist/{chunk-5DCRDV7Y.js.map → chunk-QVAFZGCF.js.map} +0 -0
  154. /package/dist/{chunk-6Z4GSQPB.js.map → chunk-RHJ4NU3W.js.map} +0 -0
  155. /package/dist/{chunk-RIOWS34T.js.map → chunk-UOOXFD74.js.map} +0 -0
@@ -3262,6 +3262,163 @@ var SOURCE_LABELS_BY_TABLE = {
3262
3262
  function getSourceLabel(tableId) {
3263
3263
  return SOURCE_LABELS_BY_TABLE[tableId] ?? tableId;
3264
3264
  }
3265
+ var DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = {
3266
+ // Doc tables
3267
+ markdown: "openframe-docs",
3268
+ data_room_doc: "data-room-docs",
3269
+ // CMS / programs
3270
+ blog_post: "blog-posts",
3271
+ product_release: "product-releases",
3272
+ case_study: "case-studies",
3273
+ onboarding_guide: "onboarding-guides",
3274
+ webinar: "webinars",
3275
+ event: "events",
3276
+ podcast: "podcasts",
3277
+ customer_interview: "customer-interviews",
3278
+ faq: "faqs",
3279
+ // Financials
3280
+ investor_update: "investor-updates",
3281
+ financial_kpi: "financial-kpis",
3282
+ cap_table: "financial-cap-table",
3283
+ profit_loss: "financial-pnl",
3284
+ balance_sheet: "financial-balance-sheet",
3285
+ cash_flow: "financial-cash-flow",
3286
+ // ClickUp
3287
+ roadmap_item: "clickup-roadmap",
3288
+ delivery_item: "clickup-delivery",
3289
+ internal_task: "clickup-tasks-internal",
3290
+ // GitHub
3291
+ github_commit: "github-commits",
3292
+ github_pull_request: "github-pull-requests",
3293
+ github_pr_review: "github-pr-reviews",
3294
+ github_commit_public: "github-commits-public",
3295
+ github_pull_request_public: "github-pull-requests-public",
3296
+ github_pr_review_public: "github-pr-reviews-public",
3297
+ // HubSpot
3298
+ hubspot_ticket: "hubspot-tickets",
3299
+ hubspot_ticket_anon: "hubspot-tickets-anon",
3300
+ hubspot_ticket_self: "hubspot-tickets-self",
3301
+ // Communications
3302
+ slack_message: "slack-messages",
3303
+ // People-hub employee content
3304
+ what_i_shipped: "what-i-shipped",
3305
+ how_i_work: "how-i-work",
3306
+ ai_prompt: "ai-prompts",
3307
+ // Product-hub internal
3308
+ design_doc: "design-docs",
3309
+ openframe_tenant: "openframe-tenants",
3310
+ prospect_call: "prospect-calls"
3311
+ };
3312
+ function defaultDocumentTypeForTableId(tableId) {
3313
+ for (const [documentType, table] of Object.entries(DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID)) {
3314
+ if (table === tableId) return documentType;
3315
+ }
3316
+ return null;
3317
+ }
3318
+
3319
+ // src/utils/source-grouping.ts
3320
+ var DOC_TABLE_TYPES = ["markdown", "data_room_doc"];
3321
+ function groupsByTable(documentType) {
3322
+ return !DOC_TABLE_TYPES.includes(documentType ?? "");
3323
+ }
3324
+ function recordCountLabel(count) {
3325
+ return `(${count} ${count === 1 ? "record" : "records"})`;
3326
+ }
3327
+ function buildGroupedSource(spec) {
3328
+ const first = spec.rows[0];
3329
+ const externalUrl = spec.externalUrl ?? first?.externalUrl;
3330
+ const targetPlatform = spec.targetPlatform !== void 0 ? spec.targetPlatform : first?.targetPlatform;
3331
+ return {
3332
+ index: spec.index,
3333
+ name: `${getSourceLabel(spec.sourceRepo)} ${recordCountLabel(spec.rows.length)}`,
3334
+ path: first?.path ?? "",
3335
+ documentType: first?.documentType ?? "",
3336
+ ...externalUrl ? { externalUrl } : {},
3337
+ targetPlatform: targetPlatform ?? null,
3338
+ sourceRepo: spec.sourceRepo,
3339
+ items: spec.rows
3340
+ };
3341
+ }
3342
+ function isGroupedChip(source) {
3343
+ return !!source.items && source.items.length > 0;
3344
+ }
3345
+ function typeOf(source) {
3346
+ return source.documentType || defaultDocumentTypeForTableId(source.sourceRepo) || "";
3347
+ }
3348
+ function joinsTableChip(source) {
3349
+ if (!source.sourceRepo) return false;
3350
+ return groupsByTable(typeOf({ ...source, sourceRepo: source.sourceRepo }));
3351
+ }
3352
+ function rowsOf(source) {
3353
+ if (isGroupedChip(source)) return source.items ?? [];
3354
+ return [
3355
+ {
3356
+ index: source.index,
3357
+ id: source.id ?? "",
3358
+ documentType: typeOf(source),
3359
+ name: source.name,
3360
+ ...source.externalUrl ? { externalUrl: source.externalUrl } : {},
3361
+ targetPlatform: source.targetPlatform ?? null,
3362
+ path: source.path || null
3363
+ }
3364
+ ];
3365
+ }
3366
+ function uniqueRows(rows) {
3367
+ const seen = /* @__PURE__ */ new Set();
3368
+ return rows.filter((row) => {
3369
+ if (!row.id) return true;
3370
+ const identity = `${row.documentType}:${row.id}`;
3371
+ if (seen.has(identity)) return false;
3372
+ seen.add(identity);
3373
+ return true;
3374
+ });
3375
+ }
3376
+ function groupSourcesByTable(sources) {
3377
+ const membersByTable = /* @__PURE__ */ new Map();
3378
+ for (const source of sources) {
3379
+ if (!joinsTableChip(source)) continue;
3380
+ const members = membersByTable.get(source.sourceRepo) ?? [];
3381
+ members.push(source);
3382
+ membersByTable.set(source.sourceRepo, members);
3383
+ }
3384
+ const emitted = /* @__PURE__ */ new Set();
3385
+ const chips = [];
3386
+ for (const source of sources) {
3387
+ if (!joinsTableChip(source)) {
3388
+ chips.push(source);
3389
+ continue;
3390
+ }
3391
+ if (emitted.has(source.sourceRepo)) continue;
3392
+ emitted.add(source.sourceRepo);
3393
+ const members = membersByTable.get(source.sourceRepo) ?? [];
3394
+ if (members.length === 1 && isGroupedChip(source)) {
3395
+ chips.push(source);
3396
+ continue;
3397
+ }
3398
+ const serverChip = members.find(isGroupedChip);
3399
+ chips.push(
3400
+ buildGroupedSource({
3401
+ index: source.index,
3402
+ sourceRepo: source.sourceRepo,
3403
+ rows: uniqueRows(members.flatMap(rowsOf)),
3404
+ ...serverChip?.externalUrl ? { externalUrl: serverChip.externalUrl } : {},
3405
+ ...serverChip && serverChip.targetPlatform !== void 0 ? { targetPlatform: serverChip.targetPlatform } : {}
3406
+ })
3407
+ );
3408
+ }
3409
+ return chips;
3410
+ }
3411
+ function formatCitationIndices(indices) {
3412
+ const sorted = [...new Set(indices)].sort((a, b) => a - b);
3413
+ const runs = [];
3414
+ for (let start = 0; start < sorted.length; ) {
3415
+ let end = start;
3416
+ while (end + 1 < sorted.length && sorted[end + 1] === sorted[end] + 1) end++;
3417
+ runs.push(end === start ? `${sorted[start]}` : `${sorted[start]}-${sorted[end]}`);
3418
+ start = end + 1;
3419
+ }
3420
+ return runs.join(", ");
3421
+ }
3265
3422
 
3266
3423
  // src/utils/app-config.ts
3267
3424
  function getAppType() {
@@ -5617,6 +5774,7 @@ exports.DEFAULT_OS_PLATFORM = DEFAULT_OS_PLATFORM;
5617
5774
  exports.DELIVERY_TASK_TYPE_OPTIONS = DELIVERY_TASK_TYPE_OPTIONS;
5618
5775
  exports.DESIGN_PALETTE = DESIGN_PALETTE;
5619
5776
  exports.DEV_SECTION_PARAM_KEYS = DEV_SECTION_PARAM_KEYS;
5777
+ exports.DOC_TABLE_TYPES = DOC_TABLE_TYPES;
5620
5778
  exports.ELAPSED_MS_FIELD = ELAPSED_MS_FIELD;
5621
5779
  exports.FIRST_TOUCH_ATTRIBUTION_KEY = FIRST_TOUCH_ATTRIBUTION_KEY;
5622
5780
  exports.FullscreenSwitchController = FullscreenSwitchController;
@@ -5671,6 +5829,7 @@ exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl;
5671
5829
  exports.buildDefaultHref = buildDefaultHref;
5672
5830
  exports.buildDiscussAddendum = buildDiscussAddendum;
5673
5831
  exports.buildDocumentTree = buildDocumentTree;
5832
+ exports.buildGroupedSource = buildGroupedSource;
5674
5833
  exports.buildListUrl = buildListUrl;
5675
5834
  exports.buildOgPlaceholderUrl = buildOgPlaceholderUrl;
5676
5835
  exports.buildSuggestionUrl = buildSuggestionUrl;
@@ -5731,6 +5890,7 @@ exports.formatBioText = formatBioText;
5731
5890
  exports.formatBytes = formatBytes;
5732
5891
  exports.formatBytesShort = formatBytesShort;
5733
5892
  exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble;
5893
+ exports.formatCitationIndices = formatCitationIndices;
5734
5894
  exports.formatClassification = formatClassification;
5735
5895
  exports.formatCompactMetric = formatCompactMetric;
5736
5896
  exports.formatCurrency = formatCurrency;
@@ -5835,6 +5995,8 @@ exports.getTaskTypeLabel = getTaskTypeLabel;
5835
5995
  exports.getToolLabel = getToolLabel;
5836
5996
  exports.getToolTypeAliases = getToolTypeAliases;
5837
5997
  exports.getTrendColors = getTrendColors;
5998
+ exports.groupSourcesByTable = groupSourcesByTable;
5999
+ exports.groupsByTable = groupsByTable;
5838
6000
  exports.hasGenericEmailDomain = hasGenericEmailDomain;
5839
6001
  exports.hexToRgb = hexToRgb2;
5840
6002
  exports.hostMatches = hostMatches;
@@ -5910,6 +6072,7 @@ exports.programMetaLine = programMetaLine;
5910
6072
  exports.programStr = programStr;
5911
6073
  exports.readDismissCookie = readDismissCookie;
5912
6074
  exports.readLeadingDecisionFrame = readLeadingDecisionFrame;
6075
+ exports.recordCountLabel = recordCountLabel;
5913
6076
  exports.releaseTypeToBadgeColor = releaseTypeToBadgeColor;
5914
6077
  exports.resolveContentFetchPath = resolveContentFetchPath;
5915
6078
  exports.resolveRedirectTarget = resolveRedirectTarget;