@flamingo-stack/openframe-frontend-core 0.0.722 → 0.0.724

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 (137) hide show
  1. package/dist/{chunk-XJYAUIOL.cjs → chunk-2A4AGW7Z.cjs} +11 -11
  2. package/dist/{chunk-65C4WHG4.js → chunk-2HLGX6JF.js} +5 -5
  3. package/dist/{chunk-5K6YKRP5.cjs → chunk-3MMKIVWZ.cjs} +23 -23
  4. package/dist/{chunk-P7Y626YJ.cjs → chunk-3NVSC3BU.cjs} +687 -611
  5. package/dist/{chunk-VSYQJCNR.js → chunk-4N5DLIEC.js} +1 -1
  6. package/dist/{chunk-GYSTZD6X.cjs → chunk-5CJGNPTT.cjs} +35 -35
  7. package/dist/{chunk-AWWLEYAU.js → chunk-6BKDXUOQ.js} +6 -6
  8. package/dist/{chunk-BUDZWXRG.js → chunk-6QO6BIX7.js} +1 -1
  9. package/dist/{chunk-FDWYBJYD.cjs → chunk-7AXOAA5T.cjs} +3 -3
  10. package/dist/{chunk-SZF7ENIW.js → chunk-7CNGNPBI.js} +3 -3
  11. package/dist/{chunk-6HRQLM6T.cjs → chunk-A4WHVIYZ.cjs} +17 -17
  12. package/dist/{chunk-VV5INIQB.cjs → chunk-BIWG3CYN.cjs} +3 -3
  13. package/dist/{chunk-I3UUMRO7.js → chunk-BWMEQ7IZ.js} +1 -1
  14. package/dist/{chunk-7UZ2JZJY.js → chunk-CJENFR5T.js} +29 -3
  15. package/dist/{chunk-IITZ6JSC.cjs → chunk-DGNGABNG.cjs} +33 -7
  16. package/dist/{chunk-KWBH63GV.cjs → chunk-FR4MFSH5.cjs} +19 -19
  17. package/dist/{chunk-DWSBTGKT.cjs → chunk-GRB5HVEV.cjs} +2610 -2125
  18. package/dist/{chunk-JQ55FFIK.cjs → chunk-IPUDFAU5.cjs} +31 -31
  19. package/dist/{chunk-F33RMJOL.js → chunk-IUQKIU5A.js} +6 -6
  20. package/dist/{chunk-LV6UJD2K.cjs → chunk-JKWQWHNV.cjs} +6 -1
  21. package/dist/{chunk-VC7COEWF.cjs → chunk-JQ7A7PO5.cjs} +76 -76
  22. package/dist/{chunk-BCU6UUNQ.js → chunk-KKO4GRM3.js} +4 -4
  23. package/dist/{chunk-RVQV6J5K.cjs → chunk-L5CAET76.cjs} +64 -64
  24. package/dist/{chunk-WY4SLTMZ.js → chunk-MRBPJ4NB.js} +1 -1
  25. package/dist/{chunk-IF72N4PE.js → chunk-MU5F5QXJ.js} +6 -6
  26. package/dist/{chunk-NMGWNUKB.js → chunk-N2PX26BZ.js} +2 -2
  27. package/dist/{chunk-NFABAOMD.cjs → chunk-N4NGKXUU.cjs} +15 -15
  28. package/dist/{chunk-ETQVXIYW.js → chunk-NLZZUWR6.js} +4 -4
  29. package/dist/{chunk-ZMHP4Y6M.js → chunk-OFOBVPDV.js} +2 -2
  30. package/dist/{chunk-DX3W7DPC.js → chunk-OWFDXYEO.js} +1 -1
  31. package/dist/{chunk-HA2ASGJM.js → chunk-PF4WAKCS.js} +4 -4
  32. package/dist/{chunk-GAFK3WNT.cjs → chunk-QJ67GFF3.cjs} +32 -32
  33. package/dist/{chunk-KBPGSPXQ.js → chunk-QN3OXRTM.js} +4492 -4007
  34. package/dist/{chunk-ZHC6MDGF.cjs → chunk-QUI7DKBW.cjs} +41 -41
  35. package/dist/{chunk-E7NIZXDT.js → chunk-S4SVKXHN.js} +88 -12
  36. package/dist/{chunk-VYHCN5NU.cjs → chunk-SOTXV3T5.cjs} +3 -3
  37. package/dist/{chunk-MJ4SXOG2.cjs → chunk-SVDXNMBL.cjs} +16 -16
  38. package/dist/{chunk-UYMTAFHG.js → chunk-VLPGV5WH.js} +1 -1
  39. package/dist/{chunk-SZ3CBFSH.js → chunk-XDTD6YGG.js} +7 -7
  40. package/dist/{chunk-VU7RU3LL.cjs → chunk-YKV45BSJ.cjs} +4 -4
  41. package/dist/{chunk-XR7NVJXS.cjs → chunk-ZKL52ALL.cjs} +3 -3
  42. package/dist/{chunk-EWED6ISQ.js → chunk-ZQKN2Z6W.js} +5 -0
  43. package/dist/{cloud-tenants-4Z36KWSX.js → cloud-tenants-5MINXS5J.js} +6 -6
  44. package/dist/{cloud-tenants-5NIC5VXK.cjs → cloud-tenants-UMZJZTMB.cjs} +7 -7
  45. package/dist/components/case-studies/index.cjs +20 -20
  46. package/dist/components/case-studies/index.js +7 -7
  47. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  48. package/dist/components/chat/index.cjs +5 -5
  49. package/dist/components/chat/index.js +4 -4
  50. package/dist/components/chat/utils/icon-library.d.ts +2 -0
  51. package/dist/components/chat/utils/icon-library.d.ts.map +1 -1
  52. package/dist/components/contact/index.cjs +8 -8
  53. package/dist/components/contact/index.js +7 -7
  54. package/dist/components/docs/index.cjs +11 -11
  55. package/dist/components/docs/index.js +10 -10
  56. package/dist/components/embeds/index.cjs +8 -8
  57. package/dist/components/embeds/index.js +7 -7
  58. package/dist/components/faq/index.cjs +8 -8
  59. package/dist/components/faq/index.js +7 -7
  60. package/dist/components/features/index.cjs +23 -7
  61. package/dist/components/features/index.d.ts +1 -0
  62. package/dist/components/features/index.d.ts.map +1 -1
  63. package/dist/components/features/index.js +22 -6
  64. package/dist/components/features/model-token-rates.d.ts +179 -0
  65. package/dist/components/features/model-token-rates.d.ts.map +1 -0
  66. package/dist/components/help-center-pages/index.cjs +130 -126
  67. package/dist/components/help-center-pages/index.js +47 -43
  68. package/dist/components/help-center-pages/trust-center-page.d.ts +34 -1
  69. package/dist/components/help-center-pages/trust-center-page.d.ts.map +1 -1
  70. package/dist/components/help-center-pages/trust-center-sections.d.ts +1 -1
  71. package/dist/components/help-center-pages/trust-center-sections.d.ts.map +1 -1
  72. package/dist/components/index.cjs +73 -55
  73. package/dist/components/index.js +36 -18
  74. package/dist/components/meeting-scheduler/index.cjs +32 -32
  75. package/dist/components/meeting-scheduler/index.js +6 -6
  76. package/dist/components/navigation/index.cjs +10 -10
  77. package/dist/components/navigation/index.js +9 -9
  78. package/dist/components/onboarding-guides/index.cjs +10 -10
  79. package/dist/components/onboarding-guides/index.js +9 -9
  80. package/dist/components/product-demo/index.cjs +7 -7
  81. package/dist/components/product-demo/index.js +7 -7
  82. package/dist/components/related-content/index.cjs +4 -4
  83. package/dist/components/related-content/index.js +3 -3
  84. package/dist/components/tickets/index.cjs +11 -11
  85. package/dist/components/tickets/index.js +10 -10
  86. package/dist/components/ui/data-attribution.d.ts +3 -1
  87. package/dist/components/ui/data-attribution.d.ts.map +1 -1
  88. package/dist/components/ui/download-button.d.ts +19 -0
  89. package/dist/components/ui/download-button.d.ts.map +1 -0
  90. package/dist/components/ui/index.cjs +9 -7
  91. package/dist/components/ui/index.d.ts +1 -0
  92. package/dist/components/ui/index.d.ts.map +1 -1
  93. package/dist/components/ui/index.js +8 -6
  94. package/dist/{devices-2TK3LAKM.js → devices-FSSUAUQN.js} +6 -6
  95. package/dist/{devices-7IKT72DK.cjs → devices-HOT7YSDN.cjs} +8 -8
  96. package/dist/index.cjs +53 -11
  97. package/dist/index.js +52 -10
  98. package/dist/{knowledge-HYSEV35H.cjs → knowledge-3N6HCFLU.cjs} +8 -8
  99. package/dist/{knowledge-3GJ4MU3V.js → knowledge-7HRUJX26.js} +6 -6
  100. package/dist/{logs-ZX3NADQC.cjs → logs-75M5YP6V.cjs} +15 -15
  101. package/dist/{logs-TATVM62H.js → logs-T25OE2QW.js} +6 -6
  102. package/dist/{policies-MRRKLF4Q.js → policies-4OK4XTD4.js} +6 -6
  103. package/dist/{policies-J4FSDKPI.cjs → policies-BTG7UJJC.cjs} +11 -11
  104. package/dist/{remote-session-Z2YCUPHU.cjs → remote-session-4DTOM3QD.cjs} +5 -5
  105. package/dist/{remote-session-WCLR47RN.js → remote-session-AZJXG7ZF.js} +3 -3
  106. package/dist/{software-update-KM46WUVQ.js → software-update-5SOV4FIR.js} +6 -6
  107. package/dist/{software-update-CXUBWYD2.cjs → software-update-OZURO4VK.cjs} +11 -11
  108. package/dist/types/index.cjs +27 -2
  109. package/dist/types/index.js +25 -3
  110. package/dist/types/trust-center.d.ts +19 -2
  111. package/dist/types/trust-center.d.ts.map +1 -1
  112. package/dist/utils/ai-providers.d.ts +29 -0
  113. package/dist/utils/ai-providers.d.ts.map +1 -0
  114. package/dist/utils/index.cjs +76 -2
  115. package/dist/utils/index.d.ts +2 -0
  116. package/dist/utils/index.d.ts.map +1 -1
  117. package/dist/utils/index.js +68 -3
  118. package/dist/utils/list-url.d.ts.map +1 -1
  119. package/dist/utils/model-token-rates.d.ts +55 -0
  120. package/dist/utils/model-token-rates.d.ts.map +1 -0
  121. package/dist/utils/source-icons.d.ts.map +1 -1
  122. package/package.json +1 -1
  123. package/src/components/chat/entity-cards/dispatch.tsx +3 -0
  124. package/src/components/chat/utils/icon-library.tsx +6 -0
  125. package/src/components/features/index.ts +1 -0
  126. package/src/components/features/model-token-rates.tsx +696 -0
  127. package/src/components/help-center-pages/trust-center-page.tsx +50 -29
  128. package/src/components/help-center-pages/trust-center-sections.tsx +2 -2
  129. package/src/components/ui/data-attribution.tsx +19 -6
  130. package/src/components/ui/download-button.tsx +34 -0
  131. package/src/components/ui/index.ts +1 -0
  132. package/src/types/trust-center.ts +52 -4
  133. package/src/utils/ai-providers.ts +46 -0
  134. package/src/utils/index.ts +2 -0
  135. package/src/utils/list-url.ts +1 -0
  136. package/src/utils/model-token-rates.ts +103 -0
  137. package/src/utils/source-icons.ts +3 -0
@@ -0,0 +1,55 @@
1
+ /**
2
+ * The per-model AI token exchange rates: their shape and how a rate is written.
3
+ * Server-safe (no client code), so a host's server (a chat source, a page's
4
+ * metadata) states a rate exactly as the shared table (`ModelTokenRates`) does.
5
+ */
6
+ /** One model's rates: OpenFrame tokens charged per ONE token of the model. */
7
+ export interface ModelTokenRate {
8
+ modelName: string;
9
+ /** The name people know the model by; the model's id stands in when it is missing. */
10
+ displayName?: string | null;
11
+ /** The provider's key (`ANTHROPIC`, `OPENAI`, `GOOGLE_GEMINI`); an unknown one is shown by name, without a mark. */
12
+ providerType: string;
13
+ /** The provider's name, when the host's server states one; else the shared provider list names it. */
14
+ providerLabel?: string | null;
15
+ /** The icon set's name of the provider's mark, when the host's server states one; else the shared provider list's. */
16
+ providerIcon?: string | null;
17
+ inputTokenRate: number;
18
+ outputTokenRate: number;
19
+ /** Charged for an input token read back from the prompt cache. Shown only where the table has room for it. */
20
+ cacheReadInputTokenRate?: number | null;
21
+ }
22
+ /** What a figure that cannot be stated is written as. */
23
+ export declare const TOKEN_RATE_EMPTY = "\u2014";
24
+ /**
25
+ * A rate as a multiplier. Two decimals from 0.1 up ("1.33×", "5×"), two
26
+ * significant digits under it ("0.033×"), so a cheap model's rate is never
27
+ * rounded to nothing.
28
+ */
29
+ export declare function formatTokenRate(value: number | null | undefined): string;
30
+ /** What OpenFrame tokens cost: `price` USD buys `tokens` of them. */
31
+ export interface TokenPrice {
32
+ tokens: number;
33
+ price: number;
34
+ }
35
+ /** What a number of OpenFrame tokens costs in USD at a price. Null without a price. */
36
+ export declare function tokenCost(tokens: number, tokenPrice: TokenPrice | null | undefined): number | null;
37
+ /**
38
+ * A token count in short form: "850", "10K", "750K", "1.25M". The unit is chosen
39
+ * from the ROUNDED figure, so a count just under a unit reads as the next one
40
+ * ("1M", never "1000K").
41
+ */
42
+ export declare function formatTokenAmount(tokens: number | null | undefined): string;
43
+ /**
44
+ * How many of a model's tokens a balance of OpenFrame tokens runs at a rate:
45
+ * the balance divided by the rate. Null without a rate.
46
+ */
47
+ export declare function tokensForBalance(balance: number, rate: number | null | undefined): number | null;
48
+ /** A provider's name: what the host stated for it, else the shared provider list's (`aiProvider`). */
49
+ export declare function tokenRateProviderLabel(providerType: string, stated?: string | null): string;
50
+ /** The rates under their providers, in the order the host gave them (providers by first appearance). */
51
+ export declare function groupTokenRatesByProvider<T extends ModelTokenRate>(rates: readonly T[]): {
52
+ providerType: string;
53
+ rates: T[];
54
+ }[];
55
+ //# sourceMappingURL=model-token-rates.d.ts.map
@@ -0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AAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAE3F;AAED,wGAAwG;AACxG,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,cAAc,EAChE,KAAK,EAAE,SAAS,CAAC,EAAE,GAClB;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,EAAE,CAAA;CAAE,EAAE,CAQxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"source-icons.d.ts","sourceRoot":"","sources":["../../src/utils/source-icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoFpD,CAAC;AAEF;;6DAE6D;AAC7D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGxF;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA2EzD,CAAC;AAEF;;kEAEkE;AAClE,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqEpE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEjF;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK5E"}
1
+ {"version":3,"file":"source-icons.d.ts","sourceRoot":"","sources":["../../src/utils/source-icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAqFpD,CAAC;AAEF;;6DAE6D;AAC7D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGxF;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4EzD,CAAC;AAEF;;kEAEkE;AAClE,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAsEpE,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEjF;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK5E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.722",
3
+ "version": "0.0.724",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1507,6 +1507,9 @@ const REF_GLYPH_CARD_CONFIGS: Record<string, GlyphCardConfig> = {
1507
1507
  // A page of the public website (pricing, product, legal, and every page the navigation lists), read live
1508
1508
  // from the data the page shows. A glyph card: a page has no cover of its own, and the card opens the page.
1509
1509
  site_page: { label: 'Website page', icon: ref => <SitePageGlyph iconName={refText(ref, 'icon_name')} /> },
1510
+ // What OpenFrame charges, read live from its billing: the plan in force, or one AI model's token exchange
1511
+ // rate. A glyph card; it opens the pricing page.
1512
+ openframe_price: { label: 'OpenFrame price', icon: () => <OpenFrameGlyph size={24} /> },
1510
1513
  // A vendor (product) of the OpenMSP directory. A glyph card; it opens the vendor's page there.
1511
1514
  vendor: { label: 'Vendor', icon: ref => <VendorGlyph title={ref?.title ?? ''} logoUrl={refText(ref, 'logo_url')} /> },
1512
1515
  };
@@ -295,6 +295,12 @@ export function resolveIcon(
295
295
  return ICON_ALIASES[iconName] ?? resolveFromLibrary(iconName) ?? FileIcon;
296
296
  }
297
297
 
298
+ /** The icon a name resolves to, or `null` when the set holds none: for a caller that draws nothing in that case (`resolveIcon` draws a fallback glyph). */
299
+ export function findIcon(iconName: string | null | undefined): IconComponent | null {
300
+ if (!iconName) return null;
301
+ return ICON_ALIASES[iconName] ?? resolveFromLibrary(iconName) ?? null;
302
+ }
303
+
298
304
  /** One selectable icon in the admin slash-command picker. */
299
305
  export interface IconOption {
300
306
  /** Stored `icon_name` value — a kebab-case `icons-v2-generated` key (or a
@@ -32,6 +32,7 @@ export * from './github-releases-manager';
32
32
  export * from './knowledge-base-links-manager';
33
33
  export * from './loading-provider';
34
34
  export * from './media-gallery-manager';
35
+ export * from './model-token-rates';
35
36
  export * from './more-about-button';
36
37
  export * from './os-type-badge';
37
38
  export * from './os-type-badge-group';