@flamingo-stack/openframe-frontend-core 0.0.813 → 0.0.815

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 (80) hide show
  1. package/README.md +26 -5
  2. package/dist/build/export-map.json +1 -1
  3. package/dist/build/next-styles.cjs +170 -0
  4. package/dist/build/next-styles.d.ts +21 -0
  5. package/dist/build/style-sources.cjs +262 -0
  6. package/dist/build/style-sources.d.ts +12 -0
  7. package/dist/{chunk-OGHG6REG.cjs → chunk-3E4FIJAM.cjs} +9 -9
  8. package/dist/{chunk-G2AN67DP.cjs → chunk-3ELDGEM2.cjs} +53 -53
  9. package/dist/{chunk-FTGXZHLO.cjs → chunk-53JJLHJM.cjs} +7 -7
  10. package/dist/{chunk-GNGXHIBC.cjs → chunk-5TUR7O7H.cjs} +48 -48
  11. package/dist/{chunk-5M5JVVSL.cjs → chunk-633NTKO2.cjs} +6 -6
  12. package/dist/{chunk-5RBL7A2Y.cjs → chunk-7ERD34HQ.cjs} +539 -291
  13. package/dist/{chunk-GTOT4ZQV.cjs → chunk-7NYWHEQM.cjs} +2 -2
  14. package/dist/{chunk-PXR27MXW.cjs → chunk-EB7YAUER.cjs} +11 -11
  15. package/dist/{chunk-TOBROYSJ.cjs → chunk-EJCUAADF.cjs} +4 -4
  16. package/dist/{chunk-MBU45QUB.cjs → chunk-FUEK43FL.cjs} +109 -142
  17. package/dist/{chunk-JFA3VHXC.cjs → chunk-JH65CEO4.cjs} +19 -19
  18. package/dist/{chunk-2WD7XGWA.cjs → chunk-JOOZTRXQ.cjs} +4 -4
  19. package/dist/{chunk-MUH7X7ZA.cjs → chunk-L7W4455K.cjs} +3 -3
  20. package/dist/{chunk-XWCZSEW7.cjs → chunk-O6VWD2SB.cjs} +3 -3
  21. package/dist/{chunk-WKODIG3L.cjs → chunk-RYJJHSHV.cjs} +10 -10
  22. package/dist/{chunk-7BJ22OH2.cjs → chunk-SWBLTIN4.cjs} +32 -32
  23. package/dist/{chunk-5V3CNLCB.cjs → chunk-VDXI26G7.cjs} +22 -18
  24. package/dist/{chunk-EJQRX6S5.cjs → chunk-ZAWHRYJZ.cjs} +39 -39
  25. package/dist/{cloud-tenants-ODZVCP5X.cjs → cloud-tenants-SRTX2FZC.cjs} +4 -4
  26. package/dist/components/case-studies/index.cjs +16 -16
  27. package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
  28. package/dist/components/chat/chat-message-enhanced.js +8 -1
  29. package/dist/components/chat/embeddable-chat.d.ts +6 -0
  30. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  31. package/dist/components/chat/embeddable-chat.js +34 -2
  32. package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts +93 -0
  33. package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts.map +1 -0
  34. package/dist/components/chat/entity-cards/chat-card-disclosure.js +126 -0
  35. package/dist/components/chat/entity-cards/dispatch.d.ts +5 -0
  36. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  37. package/dist/components/chat/entity-cards/dispatch.js +82 -55
  38. package/dist/components/chat/entity-cards/index.d.ts +1 -0
  39. package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
  40. package/dist/components/chat/entity-cards/index.js +14 -0
  41. package/dist/components/chat/index.cjs +19 -3
  42. package/dist/components/chat/index.d.ts +1 -0
  43. package/dist/components/chat/index.d.ts.map +1 -1
  44. package/dist/components/chat/index.js +7 -0
  45. package/dist/components/chat/inline-app-link-chip.d.ts +35 -0
  46. package/dist/components/chat/inline-app-link-chip.d.ts.map +1 -0
  47. package/dist/components/chat/inline-app-link-chip.js +37 -0
  48. package/dist/components/chat/source-action-button.d.ts +15 -1
  49. package/dist/components/chat/source-action-button.d.ts.map +1 -1
  50. package/dist/components/chat/source-action-button.js +40 -2
  51. package/dist/components/contact/index.cjs +5 -5
  52. package/dist/components/docs/index.cjs +8 -8
  53. package/dist/components/embeds/index.cjs +5 -5
  54. package/dist/components/faq/index.cjs +6 -6
  55. package/dist/components/features/index.cjs +4 -4
  56. package/dist/components/help-center-pages/index.cjs +61 -61
  57. package/dist/components/index.cjs +56 -40
  58. package/dist/components/meeting-scheduler/index.cjs +29 -29
  59. package/dist/components/navigation/index.cjs +7 -7
  60. package/dist/components/onboarding-guides/index.cjs +6 -6
  61. package/dist/components/product-demo/index.cjs +13 -13
  62. package/dist/components/tickets/index.cjs +9 -9
  63. package/dist/components/ui/index.cjs +22 -6
  64. package/dist/{devices-GWBR7MJD.cjs → devices-DL4YU64N.cjs} +5 -5
  65. package/dist/{embeddable-chat-4RLUXHDH.cjs → embeddable-chat-YRKMPFDY.cjs} +95 -62
  66. package/dist/index.cjs +26 -10
  67. package/dist/{knowledge-ZNRITHW5.cjs → knowledge-VQW5JL2Z.cjs} +5 -5
  68. package/dist/{logs-QN5H5JT6.cjs → logs-IY3WBLMW.cjs} +12 -12
  69. package/dist/{policies-SCUYEYGJ.cjs → policies-IXWTWMJO.cjs} +8 -8
  70. package/dist/{scripts-BP7UTAG5.cjs → scripts-D5CLO5EG.cjs} +9 -9
  71. package/dist/{software-update-O4BQJCJ4.cjs → software-update-ULNP6CKJ.cjs} +7 -7
  72. package/package.json +17 -2
  73. package/src/components/chat/chat-message-enhanced.tsx +24 -1
  74. package/src/components/chat/embeddable-chat.tsx +67 -1
  75. package/src/components/chat/entity-cards/chat-card-disclosure.tsx +233 -0
  76. package/src/components/chat/entity-cards/dispatch.tsx +104 -63
  77. package/src/components/chat/entity-cards/index.ts +9 -0
  78. package/src/components/chat/index.ts +7 -1
  79. package/src/components/chat/inline-app-link-chip.tsx +79 -0
  80. package/src/components/chat/source-action-button.tsx +53 -2
package/README.md CHANGED
@@ -43,16 +43,35 @@ Extend the shared Tailwind config in your project:
43
43
 
44
44
  ```ts
45
45
  import designSystemConfig from '@flamingo-stack/openframe-frontend-core/tailwind.config.ts'
46
+ import { appStyleSources } from '@flamingo-stack/openframe-frontend-core/style-sources'
46
47
 
47
48
  export default {
48
- ...designSystemConfig,
49
- content: [
50
- './src/**/*.{js,ts,jsx,tsx}',
51
- './node_modules/@flamingo-stack/openframe-frontend-core/src/**/*.{js,ts,jsx,tsx}'
52
- ]
49
+ presets: [designSystemConfig],
50
+ // The files your App Router routes import, yours and this library's: never this library's whole
51
+ // `dist` or `src`, which puts every component's classes in the stylesheet every page blocks on.
52
+ content: appStyleSources({ root: __dirname, appDir: 'src/app' }),
53
53
  }
54
54
  ```
55
55
 
56
+ `appStyleSources` (`scripts/style-sources.cjs`) walks the import graph from the route files, tree-shaken
57
+ as your bundler does. A host can leave the lazily loaded chat out of the page's stylesheet with
58
+ `firstPaint: true`, and give `EmbeddableChat` a `loadStyles` that loads a full stylesheet built
59
+ without it (see the file's header).
60
+
61
+ Then send the stylesheet inside each page's HTML, so a page never waits on a second request to paint,
62
+ and hold its size to a budget in your checks (`scripts/next-styles.cjs` says why and what it costs):
63
+
64
+ ```js
65
+ // next.config.mjs
66
+ import { withInlineStyles } from '@flamingo-stack/openframe-frontend-core/next-styles'
67
+ export default withInlineStyles(nextConfig)
68
+ ```
69
+
70
+ ```bash
71
+ node node_modules/@flamingo-stack/openframe-frontend-core/dist/build/next-styles.cjs budget \
72
+ --input src/app/globals.css --config tailwind.config.ts --budget 31500
73
+ ```
74
+
56
75
  ## Package Exports
57
76
 
58
77
  | Export Path | Description |
@@ -67,6 +86,8 @@ export default {
67
86
  | `./utils` | Utilities (cn, formatDate, formatPrice, getPlatformUrl, platform-config) |
68
87
  | `./types` | TypeScript type definitions |
69
88
  | `./styles` | CSS styles and ODS design tokens |
89
+ | `./style-sources` | Tailwind `content` for an app: the files its routes import (`appStyleSources`) |
90
+ | `./next-styles` | The stylesheet inside each page's HTML (`withInlineStyles`) and its size gate (`measureStylesheet`, `budget` command) |
70
91
  | `./nats` | NATS WebSocket utilities |
71
92
  | `./fonts` | Font configuration |
72
93