@mediansh/widget 0.2.0 → 0.3.0
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 +12 -0
- package/dist/chunk-3KEM4W7J.js +15 -0
- package/dist/chunk-3KEM4W7J.js.map +1 -0
- package/dist/{chunk-WF2OQH7R.js → chunk-DVQ7V3LR.js} +433 -3729
- package/dist/chunk-DVQ7V3LR.js.map +1 -0
- package/dist/chunk-W6NPKKCE.js +3314 -0
- package/dist/chunk-W6NPKKCE.js.map +1 -0
- package/dist/{highlighted-body-OFNGDK62-4TPSSDXW.js → highlighted-body-OFNGDK62-DW3EMPTG.js} +3 -2
- package/dist/highlighted-body-OFNGDK62-DW3EMPTG.js.map +1 -0
- package/dist/index.d.ts +50 -5
- package/dist/index.js +1043 -3636
- package/dist/index.js.map +1 -1
- package/dist/mermaid-GHXKKRXX-N3BSVIR6.js +10 -0
- package/dist/message-markdown-5ZZ6COCL.js +118 -0
- package/dist/message-markdown-5ZZ6COCL.js.map +1 -0
- package/dist/widget.css +1 -1
- package/package.json +3 -2
- package/dist/chunk-WF2OQH7R.js.map +0 -1
- package/dist/highlighted-body-OFNGDK62-4TPSSDXW.js.map +0 -1
- package/dist/mermaid-GHXKKRXX-O3RS5IKL.js +0 -9
- /package/dist/{mermaid-GHXKKRXX-O3RS5IKL.js.map → mermaid-GHXKKRXX-N3BSVIR6.js.map} +0 -0
package/README.md
CHANGED
|
@@ -28,6 +28,18 @@ import { MedianSupport } from "@mediansh/widget";
|
|
|
28
28
|
Mount it once, anywhere in your tree. The `median_pk_` id is derived from
|
|
29
29
|
your server's `MEDIAN_KEY`; the docs show the one line helper.
|
|
30
30
|
|
|
31
|
+
On an app with auth, serve `medianIdentity` from a route and pass that
|
|
32
|
+
instead. The key comes down with the signed in user, so the conversation
|
|
33
|
+
follows the person rather than the browser:
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
<MedianSupport identity="/api/median/identity" />;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
It costs your first paint 93KB of JavaScript and 12KB of CSS, gzipped. The
|
|
40
|
+
markdown renderer is another 199KB and loads when somebody reaches for the
|
|
41
|
+
panel, so wrapping this in `dynamic()` only delays the launcher.
|
|
42
|
+
|
|
31
43
|
## Without React
|
|
32
44
|
|
|
33
45
|
```ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../apps/web/src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;AAGO,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;","names":[]}
|