@flamingo-stack/openframe-frontend-core 0.0.239 → 0.0.241

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 (131) hide show
  1. package/dist/{chunk-PN64LWNT.js → chunk-2GMHLKEO.js} +8 -8
  2. package/dist/{chunk-36G2QXYZ.cjs → chunk-3TDLFCCS.cjs} +37 -23
  3. package/dist/chunk-3TDLFCCS.cjs.map +1 -0
  4. package/dist/{chunk-ORJREQ2W.js → chunk-4XLJWX2N.js} +4 -4
  5. package/dist/chunk-5KAQW6Q3.js +285 -0
  6. package/dist/chunk-5KAQW6Q3.js.map +1 -0
  7. package/dist/{chunk-7LLS3TWN.js → chunk-6IFN7F3C.js} +5 -5
  8. package/dist/{chunk-5VU66BD2.cjs → chunk-EFT34DLB.cjs} +498 -461
  9. package/dist/chunk-EFT34DLB.cjs.map +1 -0
  10. package/dist/{chunk-Y6463TD6.js → chunk-FEZSQQTH.js} +2 -2
  11. package/dist/{chunk-IJOJWBME.cjs → chunk-GRD7M6IZ.cjs} +27 -27
  12. package/dist/{chunk-IJOJWBME.cjs.map → chunk-GRD7M6IZ.cjs.map} +1 -1
  13. package/dist/{chunk-ELMYRGWG.cjs → chunk-JEPYFYQP.cjs} +12 -12
  14. package/dist/{chunk-ELMYRGWG.cjs.map → chunk-JEPYFYQP.cjs.map} +1 -1
  15. package/dist/{chunk-Y7DCQUNL.js → chunk-KOHE4F6Q.js} +91 -54
  16. package/dist/chunk-KOHE4F6Q.js.map +1 -0
  17. package/dist/{chunk-JDQY7JCV.js → chunk-MKVKVJQQ.js} +36 -22
  18. package/dist/chunk-MKVKVJQQ.js.map +1 -0
  19. package/dist/{chunk-MTROCWO4.cjs → chunk-QJULZ4PB.cjs} +7 -7
  20. package/dist/{chunk-MTROCWO4.cjs.map → chunk-QJULZ4PB.cjs.map} +1 -1
  21. package/dist/{chunk-FSS2MIEA.cjs → chunk-SGJBUL2Y.cjs} +20 -3
  22. package/dist/chunk-SGJBUL2Y.cjs.map +1 -0
  23. package/dist/{chunk-SZ3BBI6H.cjs → chunk-SWXWKVCC.cjs} +12 -12
  24. package/dist/{chunk-SZ3BBI6H.cjs.map → chunk-SWXWKVCC.cjs.map} +1 -1
  25. package/dist/{chunk-LJGBFD52.js → chunk-VAUI3CND.js} +18 -1
  26. package/dist/chunk-VAUI3CND.js.map +1 -0
  27. package/dist/{chunk-OB45JHDY.cjs → chunk-VFKQMAUF.cjs} +3 -3
  28. package/dist/{chunk-OB45JHDY.cjs.map → chunk-VFKQMAUF.cjs.map} +1 -1
  29. package/dist/chunk-WKZS5HWH.cjs +285 -0
  30. package/dist/chunk-WKZS5HWH.cjs.map +1 -0
  31. package/dist/{chunk-G6YZ7O27.js → chunk-Z3657YGL.js} +6 -6
  32. package/dist/components/chat/hooks/use-chat-card-item.d.ts.map +1 -1
  33. package/dist/components/chat/index.cjs +6 -6
  34. package/dist/components/chat/index.js +5 -5
  35. package/dist/components/chat/types/entities/content-ref.d.ts +5 -20
  36. package/dist/components/chat/types/entities/content-ref.d.ts.map +1 -1
  37. package/dist/components/chevron-button.d.ts +3 -1
  38. package/dist/components/chevron-button.d.ts.map +1 -1
  39. package/dist/components/contact/index.cjs +7 -7
  40. package/dist/components/contact/index.js +6 -6
  41. package/dist/components/faq/faq-section.d.ts +8 -2
  42. package/dist/components/faq/faq-section.d.ts.map +1 -1
  43. package/dist/components/faq/index.cjs +3 -3
  44. package/dist/components/faq/index.js +2 -2
  45. package/dist/components/faq/json-ld.cjs +1 -1
  46. package/dist/components/faq/json-ld.cjs.map +1 -1
  47. package/dist/components/faq/{faq-json-ld.d.ts → json-ld.d.ts} +1 -1
  48. package/dist/components/faq/json-ld.d.ts.map +1 -0
  49. package/dist/components/faq/json-ld.js +1 -1
  50. package/dist/components/faq/json-ld.js.map +1 -1
  51. package/dist/components/faq-accordion.d.ts.map +1 -1
  52. package/dist/components/features/index.cjs +6 -6
  53. package/dist/components/features/index.js +5 -5
  54. package/dist/components/index.cjs +89 -85
  55. package/dist/components/index.cjs.map +1 -1
  56. package/dist/components/index.d.ts +1 -0
  57. package/dist/components/index.d.ts.map +1 -1
  58. package/dist/components/index.js +31 -27
  59. package/dist/components/index.js.map +1 -1
  60. package/dist/components/navigation/index.cjs +6 -6
  61. package/dist/components/navigation/index.js +5 -5
  62. package/dist/components/onboarding-guides/index.cjs +30 -30
  63. package/dist/components/onboarding-guides/index.cjs.map +1 -1
  64. package/dist/components/onboarding-guides/index.js +11 -11
  65. package/dist/components/related-content/index.cjs +26 -0
  66. package/dist/components/related-content/index.cjs.map +1 -0
  67. package/dist/components/related-content/index.d.ts +2 -0
  68. package/dist/components/related-content/index.d.ts.map +1 -0
  69. package/dist/components/related-content/index.js +26 -0
  70. package/dist/components/related-content/index.js.map +1 -0
  71. package/dist/components/related-content/related-content-section.d.ts +141 -0
  72. package/dist/components/related-content/related-content-section.d.ts.map +1 -0
  73. package/dist/components/tickets/index.cjs +73 -73
  74. package/dist/components/tickets/index.cjs.map +1 -1
  75. package/dist/components/tickets/index.js +15 -15
  76. package/dist/components/ui/index.cjs +11 -11
  77. package/dist/components/ui/index.cjs.map +1 -1
  78. package/dist/components/ui/index.js +13 -13
  79. package/dist/embed-shims/index.cjs +3 -3
  80. package/dist/embed-shims/index.cjs.map +1 -1
  81. package/dist/embed-shims/index.js +5 -5
  82. package/dist/index.cjs +27 -11
  83. package/dist/index.cjs.map +1 -1
  84. package/dist/index.js +55 -39
  85. package/dist/types/content-ref.d.ts +35 -0
  86. package/dist/types/content-ref.d.ts.map +1 -0
  87. package/dist/types/index.d.ts +1 -0
  88. package/dist/types/index.d.ts.map +1 -1
  89. package/dist/utils/content-ref-groups.d.ts +58 -0
  90. package/dist/utils/content-ref-groups.d.ts.map +1 -0
  91. package/dist/utils/extract-items.d.ts +18 -0
  92. package/dist/utils/extract-items.d.ts.map +1 -0
  93. package/dist/utils/index.cjs +81 -0
  94. package/dist/utils/index.cjs.map +1 -1
  95. package/dist/utils/index.d.ts +4 -1
  96. package/dist/utils/index.d.ts.map +1 -1
  97. package/dist/utils/index.js +74 -1
  98. package/dist/utils/index.js.map +1 -1
  99. package/dist/utils/list-url.d.ts +6 -0
  100. package/dist/utils/list-url.d.ts.map +1 -1
  101. package/dist/utils/suggestion-url.d.ts +26 -0
  102. package/dist/utils/suggestion-url.d.ts.map +1 -0
  103. package/package.json +7 -1
  104. package/src/components/chat/hooks/use-chat-card-item.ts +3 -38
  105. package/src/components/chat/types/entities/content-ref.ts +5 -21
  106. package/src/components/chevron-button.tsx +5 -1
  107. package/src/components/faq/faq-section.tsx +71 -26
  108. package/src/components/faq-accordion.tsx +2 -1
  109. package/src/components/index.ts +1 -0
  110. package/src/components/related-content/index.ts +9 -0
  111. package/src/components/related-content/related-content-section.tsx +603 -0
  112. package/src/types/content-ref.ts +34 -0
  113. package/src/types/index.ts +1 -0
  114. package/src/utils/content-ref-groups.ts +89 -0
  115. package/src/utils/extract-items.ts +48 -0
  116. package/src/utils/index.ts +16 -1
  117. package/src/utils/list-url.ts +9 -0
  118. package/src/utils/suggestion-url.ts +39 -0
  119. package/dist/chunk-36G2QXYZ.cjs.map +0 -1
  120. package/dist/chunk-5VU66BD2.cjs.map +0 -1
  121. package/dist/chunk-FSS2MIEA.cjs.map +0 -1
  122. package/dist/chunk-JDQY7JCV.js.map +0 -1
  123. package/dist/chunk-LJGBFD52.js.map +0 -1
  124. package/dist/chunk-Y7DCQUNL.js.map +0 -1
  125. package/dist/components/faq/faq-json-ld.d.ts.map +0 -1
  126. /package/dist/{chunk-PN64LWNT.js.map → chunk-2GMHLKEO.js.map} +0 -0
  127. /package/dist/{chunk-ORJREQ2W.js.map → chunk-4XLJWX2N.js.map} +0 -0
  128. /package/dist/{chunk-7LLS3TWN.js.map → chunk-6IFN7F3C.js.map} +0 -0
  129. /package/dist/{chunk-Y6463TD6.js.map → chunk-FEZSQQTH.js.map} +0 -0
  130. /package/dist/{chunk-G6YZ7O27.js.map → chunk-Z3657YGL.js.map} +0 -0
  131. /package/src/components/faq/{faq-json-ld.ts → json-ld.ts} +0 -0
@@ -0,0 +1,35 @@
1
+ /**
2
+ * ContentRef — the unified link/embed shape stored in JSONB columns
3
+ * across investor updates, performance baselines, and any other entity
4
+ * that surfaces "related content" rails.
5
+ *
6
+ * Lifted from `lib/data/investor-update-utils-shared.ts` in the hub
7
+ * (the server-side data utils in the same file stay hub-side; only the
8
+ * TYPE moves here). RELOCATED from `components/chat/types/entities/`
9
+ * to this server-safe home when `RelatedContentSection` moved into the
10
+ * lib — the chat path re-exports from here, so there is exactly ONE
11
+ * `ContentRef` definition package-wide.
12
+ */
13
+ export interface ContentRef {
14
+ type: string;
15
+ id: string;
16
+ slug: string;
17
+ url: string;
18
+ targetPlatform?: string | null;
19
+ title: string;
20
+ summary?: string;
21
+ image_url?: string;
22
+ image_bg_color?: string;
23
+ visibility: 'public' | 'internal';
24
+ display_order: number;
25
+ }
26
+ /**
27
+ * A ContentRef as returned by the suggestion service (`/api/related-content`)
28
+ * — carries the 5-tier engine's placement reason. Widened to `string` here
29
+ * (the narrow reason union is hub-server vocabulary); data-only, never
30
+ * rendered by the rail.
31
+ */
32
+ export type ContentRefWithReason = ContentRef & {
33
+ reason: string;
34
+ };
35
+ //# sourceMappingURL=content-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-ref.d.ts","sourceRoot":"","sources":["../../src/types/content-ref.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,QAAQ,GAAG,UAAU,CAAC;IAClC,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -22,6 +22,7 @@ export * from './user';
22
22
  export * from './slack';
23
23
  export * from './waitlist';
24
24
  export * from './faq';
25
+ export * from './content-ref';
25
26
  export * from './report';
26
27
  export * from './stack';
27
28
  export * from './navigation';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAA;AAC9B,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACtF,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,IAAI,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAGjK,cAAc,YAAY,CAAA;AAG1B,cAAc,QAAQ,CAAA;AAGtB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,QAAQ,CAAA;AACtB,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAGlC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AAGtB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAG1B,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAGvB,cAAc,cAAc,CAAA;AAG5B,cAAc,cAAc,CAAA;AAG5B,cAAc,eAAe,CAAA;AAG7B,cAAc,YAAY,CAAA;AAG1B,cAAc,aAAa,CAAA;AAE3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAA;AAC9B,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACtF,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA;AACvB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,IAAI,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAGjK,cAAc,YAAY,CAAA;AAG1B,cAAc,QAAQ,CAAA;AAGtB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,sBAAsB,CAAA;AACpC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,QAAQ,CAAA;AACtB,cAAc,mBAAmB,CAAA;AACjC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAGlC,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AAGtB,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAG1B,cAAc,OAAO,CAAA;AACrB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AAGvB,cAAc,cAAc,CAAA;AAG5B,cAAc,cAAc,CAAA;AAG5B,cAAc,eAAe,CAAA;AAG7B,cAAc,YAAY,CAAA;AAG1B,cAAc,aAAa,CAAA;AAE3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,QAAQ,CAAA"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Content Ref Group Configuration
3
+ *
4
+ * Single source of truth for grouping content_refs by type. Used by both:
5
+ * - components/related-content (detail page rail — lives in this lib)
6
+ * - the hub's lib/utils/investor-email-utils.ts (email builder, via the
7
+ * hub's re-export shim at lib/config/content-ref-groups.ts)
8
+ *
9
+ * Lives in utils/ (server-safe tsup block) so hub server-side code can
10
+ * import it.
11
+ *
12
+ * Each entry carries the metadata RelatedContentSection needs to render the
13
+ * group WITHOUT re-implementing per-type logic locally:
14
+ * - `label`: section heading.
15
+ * - `order`: source-stable ordering (lowest first).
16
+ * - `layout`: 'list' (one-per-row, full-width cards) or 'grid' (responsive
17
+ * column grid).
18
+ * - `gridSize`: card-size variant passed to the per-type card dispatch.
19
+ * `'lg'` matches the canonical large-card variant openframe + flamingo
20
+ * apps already use; `'default'` is the legacy denser variant. New types
21
+ * should pick `'lg'` whenever the card has a large variant.
22
+ *
23
+ * Adding a new content type = one entry here. RelatedContentSection picks up
24
+ * the new group automatically (no hardcoded set to update). NOTE: the hub's
25
+ * related-content SUGGESTION candidate list is DERIVED from these keys (minus
26
+ * an explicit exclusion knob) — a new entry here becomes a suggestion
27
+ * candidate iff it also resolves through the hub's TYPE_TO_ENTITY → RAG
28
+ * config chain (unresolvable entries are dropped loudly at module load).
29
+ */
30
+ export type ContentRefLayout = 'list' | 'grid';
31
+ /** Subset of `EntityCardSize` (entity-card dispatch) appropriate for
32
+ * grid/list rendering in RelatedContentSection. Duplicated as a literal
33
+ * union here to avoid a config→component import cycle. Kept in lockstep
34
+ * with `EntityCardSize`; widen here when a new size is added there. */
35
+ export type ContentRefGridSize = 'lg' | 'default' | 'sm';
36
+ export interface ContentRefGroupConfig {
37
+ label: string;
38
+ order: number;
39
+ layout: ContentRefLayout;
40
+ gridSize: ContentRefGridSize;
41
+ }
42
+ export declare const CONTENT_REF_GROUPS: Record<string, ContentRefGroupConfig>;
43
+ /** Human-readable label for a content_ref `type`. Returns null when the type
44
+ * isn't registered — caller decides the fallback. Use `getContentRefLabelOrTitleCase`
45
+ * to get a consistent title-cased fallback across all surfaces. */
46
+ export declare function getContentRefLabel(type: string): string | null;
47
+ /** Resolved label with a single shared fallback shape — title-cased version
48
+ * of the raw type string for any unregistered type. Both RelatedContentSection
49
+ * AND the investor-email builder consume this so cross-surface label rendering
50
+ * for unregistered types is identical (no drift between "podcast guest" and
51
+ * "Podcast Guest"). */
52
+ export declare function getContentRefLabelOrTitleCase(type: string): string;
53
+ /** Sort a set of present content_ref types into the canonical group order
54
+ * (registered types first in CONTENT_REF_GROUPS `order`, then unregistered
55
+ * types appended in insertion order). Used by RelatedContentSection AND the
56
+ * investor-email builder so cross-surface ordering stays identical. */
57
+ export declare function orderContentRefTypes(present: Iterable<string>): string[];
58
+ //# sourceMappingURL=content-ref-groups.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-ref-groups.d.ts","sourceRoot":"","sources":["../../src/utils/content-ref-groups.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAA;AAE9C;;;wEAGwE;AACxE,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAA;AAExD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,gBAAgB,CAAA;IACxB,QAAQ,EAAE,kBAAkB,CAAA;CAC7B;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAUpE,CAAA;AAED;;oEAEoE;AACpE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE9D;AAED;;;;wBAIwB;AACxB,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKlE;AAED;;;wEAGwE;AACxE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAQxE"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * List-API response normalizers — HOISTED from
3
+ * `components/chat/hooks/use-chat-card-item.ts` (private copies) so the
4
+ * related-content rail can import them WITHOUT touching the chat hooks
5
+ * chunk (which reaches `@tanstack/react-query`). Pure + server-safe.
6
+ *
7
+ * The hub's `lib/utils/entity-list-api.ts` re-exports these — one
8
+ * implementation of response-shape normalization across both repos.
9
+ */
10
+ /** Extract the items array from each endpoint's response shape (some
11
+ * return `{ items }`, others `{ posts }`, etc.). Single normalization
12
+ * point — callers always read `Item[]`. */
13
+ export declare function extractItems(data: unknown): unknown[];
14
+ /** Extract a stable id from a fetched item — different shapes use
15
+ * `id` vs `external_id`. Used by the chat loader to match the fetched
16
+ * array element back to the marker's id. */
17
+ export declare function extractItemId(type: string, item: unknown): string | null;
18
+ //# sourceMappingURL=extract-items.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-items.d.ts","sourceRoot":"","sources":["../../src/utils/extract-items.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;4CAE4C;AAC5C,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,EAAE,CAerD;AAED;;6CAE6C;AAC7C,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAcxE"}
@@ -3290,6 +3290,9 @@ function scrollElementIntoView(target, options = {}) {
3290
3290
 
3291
3291
  // src/utils/list-url.ts
3292
3292
  var ALIASES = { blog_post_existing: "blog_post" };
3293
+ function canonicalContentRefType(contentRefType) {
3294
+ return ALIASES[contentRefType] ?? contentRefType;
3295
+ }
3293
3296
  var BUILDERS = {
3294
3297
  roadmap_item: (ids, b) => `${b}/api/roadmap?task_ids=${ids.join(",")}`,
3295
3298
  delivery_item: (ids, b) => `${b}/api/delivery?task_ids=${ids.join(",")}`,
@@ -3314,6 +3317,76 @@ function buildListUrl(contentRefType, ids, base = "") {
3314
3317
  return fn ? fn(ids, base) : null;
3315
3318
  }
3316
3319
 
3320
+ // src/utils/content-ref-groups.ts
3321
+ var CONTENT_REF_GROUPS = {
3322
+ investor_update: { label: "Investor Updates", order: 1, layout: "grid", gridSize: "default" },
3323
+ product_release: { label: "Product Releases", order: 2, layout: "list", gridSize: "lg" },
3324
+ podcast: { label: "Podcasts", order: 3, layout: "list", gridSize: "default" },
3325
+ webinar: { label: "Webinars", order: 4, layout: "list", gridSize: "default" },
3326
+ case_study: { label: "Case Studies", order: 5, layout: "grid", gridSize: "default" },
3327
+ event: { label: "Events", order: 6, layout: "list", gridSize: "default" },
3328
+ blog_post_existing: { label: "Blog Posts", order: 7, layout: "grid", gridSize: "default" },
3329
+ customer_interview: { label: "Customer Interviews", order: 8, layout: "grid", gridSize: "default" },
3330
+ onboarding_guide: { label: "Onboarding Guides", order: 9, layout: "grid", gridSize: "default" }
3331
+ };
3332
+ function getContentRefLabel(type) {
3333
+ return CONTENT_REF_GROUPS[type]?.label ?? null;
3334
+ }
3335
+ function getContentRefLabelOrTitleCase(type) {
3336
+ return CONTENT_REF_GROUPS[type]?.label ?? type.replace(/_/g, " ").replace(/\b\w/g, (ch) => ch.toUpperCase());
3337
+ }
3338
+ function orderContentRefTypes(present) {
3339
+ const presentSet = new Set(present);
3340
+ const registeredInOrder = Object.entries(CONTENT_REF_GROUPS).sort(([, a], [, b]) => a.order - b.order).map(([type]) => type).filter((type) => presentSet.has(type));
3341
+ const unregistered = [...presentSet].filter((type) => !CONTENT_REF_GROUPS[type]);
3342
+ return [...registeredInOrder, ...unregistered];
3343
+ }
3344
+
3345
+ // src/utils/extract-items.ts
3346
+ function extractItems(data) {
3347
+ if (!data || typeof data !== "object") return [];
3348
+ const obj = data;
3349
+ if (Array.isArray(obj.items)) return obj.items;
3350
+ if (Array.isArray(obj.posts)) return obj.posts;
3351
+ if (Array.isArray(obj.campaigns)) return obj.campaigns;
3352
+ if (Array.isArray(obj.completed) || Array.isArray(obj.inProgress)) {
3353
+ const completed = Array.isArray(obj.completed) ? obj.completed : [];
3354
+ const inProgress = Array.isArray(obj.inProgress) ? obj.inProgress : [];
3355
+ return [...completed, ...inProgress];
3356
+ }
3357
+ if (Array.isArray(obj.data)) return obj.data;
3358
+ if (Array.isArray(data)) return data;
3359
+ return [];
3360
+ }
3361
+ function extractItemId(type, item) {
3362
+ if (!item || typeof item !== "object") return null;
3363
+ const obj = item;
3364
+ if (type === "roadmap_item" || type === "delivery_item" || type === "internal_task") {
3365
+ const ext = obj.external_id;
3366
+ if (typeof ext === "string") return ext;
3367
+ }
3368
+ const id = obj.id;
3369
+ if (typeof id === "string") return id;
3370
+ if (typeof id === "number") return String(id);
3371
+ return null;
3372
+ }
3373
+
3374
+ // src/utils/suggestion-url.ts
3375
+ function buildSuggestionUrl(path, opts = {}) {
3376
+ const qs = new URLSearchParams();
3377
+ const { entityType, entityId } = opts;
3378
+ if (entityType && entityId !== void 0 && entityId !== null && entityId !== "") {
3379
+ qs.set("entityType", entityType);
3380
+ qs.set("entityId", String(entityId));
3381
+ }
3382
+ if (opts.count !== void 0) qs.set("count", String(opts.count));
3383
+ for (const [key, value] of Object.entries(opts.extraParams ?? {})) {
3384
+ if (value !== void 0 && value !== "") qs.set(key, value);
3385
+ }
3386
+ const query = qs.toString();
3387
+ return `${opts.apiBaseUrl ?? ""}${path}${query ? `?${query}` : ""}`;
3388
+ }
3389
+
3317
3390
  // src/utils/content-href.ts
3318
3391
  var DEFAULT_CONTENT_SUFFIXES = {
3319
3392
  onboarding_guide: "onboarding-guides",
@@ -3379,6 +3452,7 @@ exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN;
3379
3452
  exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM;
3380
3453
  exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX;
3381
3454
  exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED;
3455
+ exports.CONTENT_REF_GROUPS = CONTENT_REF_GROUPS;
3382
3456
  exports.CUSTOM_ITEM_ID = CUSTOM_ITEM_ID;
3383
3457
  exports.DEFAULT_CONTENT_SUFFIXES = DEFAULT_CONTENT_SUFFIXES;
3384
3458
  exports.DEFAULT_MIN_FILL_MS = DEFAULT_MIN_FILL_MS;
@@ -3407,6 +3481,8 @@ exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl;
3407
3481
  exports.buildDefaultHref = buildDefaultHref;
3408
3482
  exports.buildDiscussAddendum = buildDiscussAddendum;
3409
3483
  exports.buildListUrl = buildListUrl;
3484
+ exports.buildSuggestionUrl = buildSuggestionUrl;
3485
+ exports.canonicalContentRefType = canonicalContentRefType;
3410
3486
  exports.cleanEmailDomain = cleanEmailDomain;
3411
3487
  exports.clearEmbedProxyAuth = clearEmbedProxyAuth;
3412
3488
  exports.clickupTaskUrl = clickupTaskUrl;
@@ -3423,6 +3499,8 @@ exports.extractDominantColor = extractDominantColor;
3423
3499
  exports.extractEntityIdFilter = extractEntityIdFilter;
3424
3500
  exports.extractHumanitySignals = extractHumanitySignals;
3425
3501
  exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync;
3502
+ exports.extractItemId = extractItemId;
3503
+ exports.extractItems = extractItems;
3426
3504
  exports.fetchPriorityProp = fetchPriorityProp;
3427
3505
  exports.flattenAssistantContent = flattenAssistantContent;
3428
3506
  exports.formatAbbreviatedNumber = formatAbbreviatedNumber;
@@ -3470,6 +3548,8 @@ exports.getConfidenceColorClass = getConfidenceColorClass;
3470
3548
  exports.getConfidenceLabel = getConfidenceLabel;
3471
3549
  exports.getConfidenceLevel = getConfidenceLevel;
3472
3550
  exports.getConfidenceTextClass = getConfidenceTextClass;
3551
+ exports.getContentRefLabel = getContentRefLabel;
3552
+ exports.getContentRefLabelOrTitleCase = getContentRefLabelOrTitleCase;
3473
3553
  exports.getContrastRatio = getContrastRatio;
3474
3554
  exports.getCountryByCode = getCountryByCode;
3475
3555
  exports.getCountryPhoneData = getCountryPhoneData;
@@ -3524,6 +3604,7 @@ exports.normalizeIconKey = normalizeIconKey;
3524
3604
  exports.normalizeOSType = normalizeOSType;
3525
3605
  exports.normalizeToolType = normalizeToolType;
3526
3606
  exports.normalizeToolTypeWithFallback = normalizeToolTypeWithFallback;
3607
+ exports.orderContentRefTypes = orderContentRefTypes;
3527
3608
  exports.parseScrollAnchor = parseScrollAnchor;
3528
3609
  exports.parseWireCommandOverride = parseWireCommandOverride;
3529
3610
  exports.platformColors = platformColors;