@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.
- package/README.md +26 -5
- package/dist/build/export-map.json +1 -1
- package/dist/build/next-styles.cjs +170 -0
- package/dist/build/next-styles.d.ts +21 -0
- package/dist/build/style-sources.cjs +262 -0
- package/dist/build/style-sources.d.ts +12 -0
- package/dist/{chunk-OGHG6REG.cjs → chunk-3E4FIJAM.cjs} +9 -9
- package/dist/{chunk-G2AN67DP.cjs → chunk-3ELDGEM2.cjs} +53 -53
- package/dist/{chunk-FTGXZHLO.cjs → chunk-53JJLHJM.cjs} +7 -7
- package/dist/{chunk-GNGXHIBC.cjs → chunk-5TUR7O7H.cjs} +48 -48
- package/dist/{chunk-5M5JVVSL.cjs → chunk-633NTKO2.cjs} +6 -6
- package/dist/{chunk-5RBL7A2Y.cjs → chunk-7ERD34HQ.cjs} +539 -291
- package/dist/{chunk-GTOT4ZQV.cjs → chunk-7NYWHEQM.cjs} +2 -2
- package/dist/{chunk-PXR27MXW.cjs → chunk-EB7YAUER.cjs} +11 -11
- package/dist/{chunk-TOBROYSJ.cjs → chunk-EJCUAADF.cjs} +4 -4
- package/dist/{chunk-MBU45QUB.cjs → chunk-FUEK43FL.cjs} +109 -142
- package/dist/{chunk-JFA3VHXC.cjs → chunk-JH65CEO4.cjs} +19 -19
- package/dist/{chunk-2WD7XGWA.cjs → chunk-JOOZTRXQ.cjs} +4 -4
- package/dist/{chunk-MUH7X7ZA.cjs → chunk-L7W4455K.cjs} +3 -3
- package/dist/{chunk-XWCZSEW7.cjs → chunk-O6VWD2SB.cjs} +3 -3
- package/dist/{chunk-WKODIG3L.cjs → chunk-RYJJHSHV.cjs} +10 -10
- package/dist/{chunk-7BJ22OH2.cjs → chunk-SWBLTIN4.cjs} +32 -32
- package/dist/{chunk-5V3CNLCB.cjs → chunk-VDXI26G7.cjs} +22 -18
- package/dist/{chunk-EJQRX6S5.cjs → chunk-ZAWHRYJZ.cjs} +39 -39
- package/dist/{cloud-tenants-ODZVCP5X.cjs → cloud-tenants-SRTX2FZC.cjs} +4 -4
- package/dist/components/case-studies/index.cjs +16 -16
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/chat-message-enhanced.js +8 -1
- package/dist/components/chat/embeddable-chat.d.ts +6 -0
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/embeddable-chat.js +34 -2
- package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts +93 -0
- package/dist/components/chat/entity-cards/chat-card-disclosure.d.ts.map +1 -0
- package/dist/components/chat/entity-cards/chat-card-disclosure.js +126 -0
- package/dist/components/chat/entity-cards/dispatch.d.ts +5 -0
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.js +82 -55
- package/dist/components/chat/entity-cards/index.d.ts +1 -0
- package/dist/components/chat/entity-cards/index.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/index.js +14 -0
- package/dist/components/chat/index.cjs +19 -3
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +7 -0
- package/dist/components/chat/inline-app-link-chip.d.ts +35 -0
- package/dist/components/chat/inline-app-link-chip.d.ts.map +1 -0
- package/dist/components/chat/inline-app-link-chip.js +37 -0
- package/dist/components/chat/source-action-button.d.ts +15 -1
- package/dist/components/chat/source-action-button.d.ts.map +1 -1
- package/dist/components/chat/source-action-button.js +40 -2
- package/dist/components/contact/index.cjs +5 -5
- package/dist/components/docs/index.cjs +8 -8
- package/dist/components/embeds/index.cjs +5 -5
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/features/index.cjs +4 -4
- package/dist/components/help-center-pages/index.cjs +61 -61
- package/dist/components/index.cjs +56 -40
- package/dist/components/meeting-scheduler/index.cjs +29 -29
- package/dist/components/navigation/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/product-demo/index.cjs +13 -13
- package/dist/components/tickets/index.cjs +9 -9
- package/dist/components/ui/index.cjs +22 -6
- package/dist/{devices-GWBR7MJD.cjs → devices-DL4YU64N.cjs} +5 -5
- package/dist/{embeddable-chat-4RLUXHDH.cjs → embeddable-chat-YRKMPFDY.cjs} +95 -62
- package/dist/index.cjs +26 -10
- package/dist/{knowledge-ZNRITHW5.cjs → knowledge-VQW5JL2Z.cjs} +5 -5
- package/dist/{logs-QN5H5JT6.cjs → logs-IY3WBLMW.cjs} +12 -12
- package/dist/{policies-SCUYEYGJ.cjs → policies-IXWTWMJO.cjs} +8 -8
- package/dist/{scripts-BP7UTAG5.cjs → scripts-D5CLO5EG.cjs} +9 -9
- package/dist/{software-update-O4BQJCJ4.cjs → software-update-ULNP6CKJ.cjs} +7 -7
- package/package.json +17 -2
- package/src/components/chat/chat-message-enhanced.tsx +24 -1
- package/src/components/chat/embeddable-chat.tsx +67 -1
- package/src/components/chat/entity-cards/chat-card-disclosure.tsx +233 -0
- package/src/components/chat/entity-cards/dispatch.tsx +104 -63
- package/src/components/chat/entity-cards/index.ts +9 -0
- package/src/components/chat/index.ts +7 -1
- package/src/components/chat/inline-app-link-chip.tsx +79 -0
- 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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
|