@softistx/pulsarix-widget 0.8.4 → 0.9.1
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 +45 -22
- package/dist/chunks/{abnfDiagram-XWFEHMT6.b9yk4x5x.js → abnfDiagram-XWFEHMT6.xef4vppv.js} +1 -1
- package/dist/chunks/architecture-WOLXFQ4H.pp4drcrh.js +1 -0
- package/dist/chunks/{architectureDiagram-CSQXQB3N.qz18rz0g.js → architectureDiagram-CSQXQB3N.0bddzt5e.js} +1 -1
- package/dist/chunks/{blockDiagram-BEDRHYPZ.bb08b9nt.js → blockDiagram-BEDRHYPZ.wgdr8xfr.js} +1 -1
- package/dist/chunks/{c4Diagram-M2UUVUY5.px0epccd.js → c4Diagram-M2UUVUY5.t09pndbz.js} +1 -1
- package/dist/chunks/{chat-markdown-CrbWbK1O.k4nmgyey.js → chat-markdown-CQ4fSIYN.cv3fprzq.js} +2 -2
- package/dist/chunks/{classDiagram-v2-KXABOMEV.f02387t9.js → classDiagram-v2-KXABOMEV.9yfjtevj.js} +1 -1
- package/dist/chunks/{cose-bilkent-JH36ORCC.azq9k24r.js → cose-bilkent-JH36ORCC.qam7r9b1.js} +1 -1
- package/dist/chunks/cynefin-EF2NZ3EQ.wgr8qmb2.js +1 -0
- package/dist/chunks/{cynefinDiagram-NJNITYFG.zt7gprt1.js → cynefinDiagram-NJNITYFG.k6mhek0s.js} +1 -1
- package/dist/chunks/{dagre-KIHZ2IZ3.702bqbr9.js → dagre-KIHZ2IZ3.sqeg911s.js} +1 -1
- package/dist/chunks/{diagram-7YQZDPLS.m7vf21j6.js → diagram-7YQZDPLS.k1qvmctj.js} +1 -1
- package/dist/chunks/{diagram-QBROCOUO.33e5hv7x.js → diagram-QBROCOUO.v7fe7e4g.js} +1 -1
- package/dist/chunks/{diagram-RJJCUUZO.94k74bz7.js → diagram-RJJCUUZO.12s15pm6.js} +1 -1
- package/dist/chunks/{diagram-WERXNKYE.7fe849z6.js → diagram-WERXNKYE.tmrcv4we.js} +1 -1
- package/dist/chunks/{diagram-YHHI257C.qjjjfq7w.js → diagram-YHHI257C.7735ve6v.js} +1 -1
- package/dist/chunks/{diagram-YR4HJLHV.310x2we2.js → diagram-YR4HJLHV.nytxr7pa.js} +1 -1
- package/dist/chunks/{ebnfDiagram-N527522P.a4crteq1.js → ebnfDiagram-N527522P.6eqw92nv.js} +1 -1
- package/dist/chunks/{editor-shortcuts-dialog-B0ppoiza.x3p4h07t.js → editor-shortcuts-dialog-VmvMTjnq.mm7ab69f.js} +1 -1
- package/dist/chunks/editor.wb4jsrjy.js +4 -0
- package/dist/chunks/{elk-O5DQBFGD.dx61etan.js → elk-O5DQBFGD.a5rqryhg.js} +1 -1
- package/dist/chunks/{emoji-picker-CbvQZ2ZL.nst616hd.js → emoji-picker-bnO0yA8e.bymgjc9a.js} +1 -1
- package/dist/chunks/{erDiagram-K3K3BIDK.qzqv67zm.js → erDiagram-K3K3BIDK.exfeddaa.js} +1 -1
- package/dist/chunks/eventmodeling-K75KTNOO.nkahp6zg.js +1 -0
- package/dist/chunks/{flow-diagram-AiM6FiIm.73jr19pb.js → flow-diagram-Byy7DBZZ.pf5vdbkn.js} +1 -1
- package/dist/chunks/flowDiagram-Z6JWZHQI.54yz6gfm.js +1 -0
- package/dist/chunks/{ganttDiagram-3PRQTZWP.xngzb32h.js → ganttDiagram-3PRQTZWP.0tjaeqjw.js} +1 -1
- package/dist/chunks/gitGraph-VSP46ZUC.2a0am491.js +1 -0
- package/dist/chunks/{gitGraphDiagram-VXDFKS5L.1sm36z2q.js → gitGraphDiagram-VXDFKS5L.6vvbj88t.js} +1 -1
- package/dist/chunks/{grid-E2QIVN74.76pgtn2n.js → grid-E2QIVN74.frpdy6t3.js} +1 -1
- package/dist/chunks/illustration-BfueshiW.syv54ccw.js +1 -0
- package/dist/chunks/{index.fbeztcp3.js → index.0kv7tp87.js} +1 -1
- package/dist/chunks/{index.r0p3fm9f.js → index.3pn4wy4j.js} +1 -1
- package/dist/chunks/{index.0e4s8r4m.js → index.7q6v461v.js} +1 -1
- package/dist/chunks/{index.hvdnkr5m.js → index.93zpfh3k.js} +1 -1
- package/dist/chunks/{index.32jxrb9b.js → index.bs3ygyp2.js} +1 -1
- package/dist/chunks/{index.7gxz6d1f.js → index.d8b8y928.js} +2 -2
- package/dist/chunks/{index.t34t6kpe.js → index.f6jhkm5c.js} +1 -1
- package/dist/chunks/{index.8f3x951p.js → index.kh3f3gw8.js} +1 -1
- package/dist/chunks/{index.zm5x44tn.js → index.mcyw2bze.js} +1 -1
- package/dist/chunks/{index.7k5v3p25.js → index.newjn1k4.js} +1 -1
- package/dist/chunks/{index.1d7qpsyx.js → index.nrd5w1x0.js} +1 -1
- package/dist/chunks/{index.9bf5qrah.js → index.pyz71tqx.js} +1 -1
- package/dist/chunks/index.rn0vxns6.js +44 -0
- package/dist/chunks/{index.0k4tbjhp.js → index.sv013f1z.js} +1 -1
- package/dist/chunks/{index.dnnzjw18.js → index.xrg5yg8d.js} +1 -1
- package/dist/chunks/{index.wrjdgn4c.js → index.yexf86bf.js} +1 -1
- package/dist/chunks/{index.a1bxkgd3.js → index.yfbwd99n.js} +2 -2
- package/dist/chunks/{index.rfyzb2yv.js → index.zjykrx6y.js} +1 -1
- package/dist/chunks/info-OHQRW6UA.4824y3cd.js +1 -0
- package/dist/chunks/{infoDiagram-EZ3ZOAHP.pfd0fjwn.js → infoDiagram-EZ3ZOAHP.qh2bwz3m.js} +1 -1
- package/dist/chunks/{ishikawaDiagram-S3EKX5GW.h5kjez1x.js → ishikawaDiagram-S3EKX5GW.w2v6vnwd.js} +1 -1
- package/dist/chunks/{journeyDiagram-POQNLL5X.55cqc9p0.js → journeyDiagram-POQNLL5X.ftkfdsrw.js} +1 -1
- package/dist/chunks/{kanban-definition-BH5XI6FM.pkdvda4y.js → kanban-definition-BH5XI6FM.9scqhcx5.js} +1 -1
- package/dist/chunks/{markup-color-chrome-ykGNUl8y.0ds56d6x.js → markup-color-chrome-ykGNUl8y.8cysjsfb.js} +1 -1
- package/dist/chunks/{markup-custom-color-Dgm2hHI7.7darvajx.js → markup-custom-color-CytmKw-R.d25j0pcj.js} +1 -1
- package/dist/chunks/{mention-list-CkAUzPBG.mtjgmmzb.js → mention-list-5h2lZwEU.wffam6eb.js} +1 -1
- package/dist/chunks/{mermaid.core.j7s05j63.js → mermaid.core.tnh468qk.js} +2 -2
- package/dist/chunks/{mindmap-definition-WVAN44T4.x3jbxvft.js → mindmap-definition-WVAN44T4.gskntx1f.js} +1 -1
- package/dist/chunks/packet-JDAUHWVQ.w0pv2dxr.js +1 -0
- package/dist/chunks/{panel.9tp7gr60.js → panel.dq8vt40k.js} +1 -1
- package/dist/chunks/{pegDiagram-D4NLKWP3.xq15gqy9.js → pegDiagram-D4NLKWP3.yb58dpky.js} +1 -1
- package/dist/chunks/pie-XZMESJXO.zq72f2fq.js +1 -0
- package/dist/chunks/{pieDiagram-36ENHN4W.8h0wam54.js → pieDiagram-36ENHN4W.7pgn8ayz.js} +1 -1
- package/dist/chunks/{plated-illustration-COZYWJ81.xy7ba5mq.js → plated-illustration-VrnsTz7H.tcyq0sxa.js} +1 -1
- package/dist/chunks/{quadrantDiagram-ZQUDMS73.k28g8jpn.js → quadrantDiagram-ZQUDMS73.1a721ces.js} +1 -1
- package/dist/chunks/radar-ABXABTNO.288gs0b8.js +1 -0
- package/dist/chunks/railroad-I3PHUGI6.aadrd13j.js +1 -0
- package/dist/chunks/railroad-abnf-LNEFI6M7.6btgmncj.js +1 -0
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.y44ppt8p.js +1 -0
- package/dist/chunks/railroad-peg-JR7BVNR7.328jgxkz.js +1 -0
- package/dist/chunks/{railroadDiagram-JIZHGYPL.e7p2vqgg.js → railroadDiagram-JIZHGYPL.xpgkt1zp.js} +1 -1
- package/dist/chunks/{render-VIF2ZAQL.w5ytncsg.js → render-VIF2ZAQL.khtqjmgm.js} +1 -1
- package/dist/chunks/{requirementDiagram-AXW2TVFA.arekdz02.js → requirementDiagram-AXW2TVFA.ms6anxwg.js} +1 -1
- package/dist/chunks/{sankeyDiagram-FBCJTAIF.1d04xcmb.js → sankeyDiagram-FBCJTAIF.40yzed7d.js} +1 -1
- package/dist/chunks/{sequenceDiagram-3LA2ROMG.j4xywwp1.js → sequenceDiagram-3LA2ROMG.z0h3shw2.js} +1 -1
- package/dist/chunks/{sizeCapture-2Q2CQKSF.862bnf6p.js → sizeCapture-2Q2CQKSF.4dh5g271.js} +1 -1
- package/dist/chunks/{stateDiagram-v2-ATKHQDJO.xvvtr0y2.js → stateDiagram-v2-ATKHQDJO.5ftcgs8s.js} +1 -1
- package/dist/chunks/{swimlanes-YQL5WMAO.dtnjb4xt.js → swimlanes-YQL5WMAO.r6vmskrb.js} +1 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.exhrz16x.js +8 -0
- package/dist/chunks/{timeline-definition-7Z437IG3.zfhqzc4r.js → timeline-definition-7Z437IG3.eke70hfq.js} +1 -1
- package/dist/chunks/treeView-D4JQ5SDB.xz61fh4x.js +1 -0
- package/dist/chunks/treemap-SAJKECNS.8gv7pmqr.js +1 -0
- package/dist/chunks/{usecaseDiagram-RDK6N6HP.ewxnyz4c.js → usecaseDiagram-RDK6N6HP.d8p4tnc6.js} +1 -1
- package/dist/chunks/{vennDiagram-SHRQU5PJ.wkzf1f00.js → vennDiagram-SHRQU5PJ.4s46abxd.js} +1 -1
- package/dist/chunks/wardley-7MLQ67FV.6v9j3be8.js +1 -0
- package/dist/chunks/{wardleyDiagram-F3OXNVQS.srjfm4nb.js → wardleyDiagram-F3OXNVQS.mq49fny4.js} +1 -1
- package/dist/chunks/{xychartDiagram-GDYJKCDI.xfa2vexk.js → xychartDiagram-GDYJKCDI.d7he0fxa.js} +1 -1
- package/dist/index.js +17 -10
- package/dist/react.js +74 -0
- package/dist/server.js +20 -0
- package/dist/types/react.d.ts +27 -0
- package/dist/types/server.d.ts +15 -0
- package/docs/integration.md +78 -11
- package/package.json +18 -3
- package/dist/chunks/architecture-WOLXFQ4H.aft3rkrr.js +0 -1
- package/dist/chunks/cynefin-EF2NZ3EQ.dk039jny.js +0 -1
- package/dist/chunks/editor.arg3zy29.js +0 -4
- package/dist/chunks/eventmodeling-K75KTNOO.gmm1bcak.js +0 -1
- package/dist/chunks/flowDiagram-Z6JWZHQI.fzwqg115.js +0 -1
- package/dist/chunks/gitGraph-VSP46ZUC.0m8jykgw.js +0 -1
- package/dist/chunks/illustration-BOW28wq5.bkz28k1x.js +0 -1
- package/dist/chunks/index.e35b4yh5.js +0 -44
- package/dist/chunks/info-OHQRW6UA.e0a85drn.js +0 -1
- package/dist/chunks/packet-JDAUHWVQ.52409p3r.js +0 -1
- package/dist/chunks/pie-XZMESJXO.q5kre8cx.js +0 -1
- package/dist/chunks/radar-ABXABTNO.yk872k2n.js +0 -1
- package/dist/chunks/railroad-I3PHUGI6.9wfa6vs3.js +0 -1
- package/dist/chunks/railroad-abnf-LNEFI6M7.70zznk3b.js +0 -1
- package/dist/chunks/railroad-ebnf-DWYD2UWJ.4pvdng0p.js +0 -1
- package/dist/chunks/railroad-peg-JR7BVNR7.ev15ebp6.js +0 -1
- package/dist/chunks/swimlanesDiagram-UCCPES4V.0q8kd5qn.js +0 -8
- package/dist/chunks/treeView-D4JQ5SDB.3fzswdjp.js +0 -1
- package/dist/chunks/treemap-SAJKECNS.cgh74bhn.js +0 -1
- package/dist/chunks/wardley-7MLQ67FV.6q5tgt0s.js +0 -1
package/README.md
CHANGED
|
@@ -6,29 +6,10 @@ Shadow DOM, so your page's styles and the widget's never touch.
|
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
-
The package is
|
|
10
|
-
the `@softistx` scope. Point the scope at npmjs with the token read from an environment variable
|
|
11
|
-
(never commit its value).
|
|
12
|
-
|
|
13
|
-
In `bunfig.toml` (Bun):
|
|
14
|
-
|
|
15
|
-
```toml
|
|
16
|
-
[install.scopes]
|
|
17
|
-
"@softistx" = { url = "https://registry.npmjs.org", token = "$NPM_SOFTISTX_READ_TOKEN" }
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Or in `.npmrc` (npm, pnpm, yarn):
|
|
21
|
-
|
|
22
|
-
```ini
|
|
23
|
-
@softistx:registry=https://registry.npmjs.org
|
|
24
|
-
//registry.npmjs.org/:_authToken=${NPM_SOFTISTX_READ_TOKEN}
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Then:
|
|
9
|
+
The package is public on npmjs under the MIT licence; no token is needed:
|
|
28
10
|
|
|
29
11
|
```sh
|
|
30
|
-
|
|
31
|
-
npm install @softistx/pulsarix-widget
|
|
12
|
+
npm install @softistx/pulsarix-widget # or: bun add @softistx/pulsarix-widget
|
|
32
13
|
```
|
|
33
14
|
|
|
34
15
|
The `mount()` route below is for apps that install the package. Third-party sites use the
|
|
@@ -121,9 +102,47 @@ your bundler emits them as lazy chunks and a page that never opens them never lo
|
|
|
121
102
|
|
|
122
103
|
A script-tag loader and an npm import are two separate instances: use one route per page.
|
|
123
104
|
|
|
105
|
+
### React
|
|
106
|
+
|
|
107
|
+
```tsx
|
|
108
|
+
import { PulsarixWidget } from "@softistx/pulsarix-widget/react";
|
|
109
|
+
|
|
110
|
+
<PulsarixWidget
|
|
111
|
+
projectKey="pk_live_xxx"
|
|
112
|
+
apiBase="https://<pulsarix-host>"
|
|
113
|
+
identity={token} // placeholder: the token your server signed for the signed-in user; null signs out
|
|
114
|
+
theme={mode} // placeholder: your app's resolved "light" | "dark" | "auto"
|
|
115
|
+
locale={locale} // placeholder: your app's language, "en" | "fr"
|
|
116
|
+
/>;
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The hook returns the handle (`null` until mounted, and on the server):
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
import { usePulsarix } from "@softistx/pulsarix-widget/react";
|
|
123
|
+
|
|
124
|
+
function HelpMenu() {
|
|
125
|
+
const widget = usePulsarix({
|
|
126
|
+
projectKey: "pk_live_xxx",
|
|
127
|
+
apiBase: "https://<pulsarix-host>",
|
|
128
|
+
launcher: false, // your own button opens it
|
|
129
|
+
onError: (error) => reportToYourLogger(error), // placeholder logger
|
|
130
|
+
});
|
|
131
|
+
return <button onClick={() => widget?.open()}>Report a problem</button>;
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`react` is an optional peer dependency. `<PulsarixWidget>` (and `usePulsarix(options)`, which returns the
|
|
136
|
+
handle) mounts once in an effect, unmounts on cleanup, works under `StrictMode` and server rendering, and
|
|
137
|
+
calls `onError` when the widget fails to load, and applies a change of `theme`, `locale`, `metadata`, `identity` or `launcherVisible` to the live widget
|
|
138
|
+
without remounting; only a new `projectKey` or `apiBase` remounts. Full example: `docs/integration.md`,
|
|
139
|
+
"React Router".
|
|
140
|
+
|
|
124
141
|
### Exports
|
|
125
142
|
|
|
126
|
-
Server helper: `@softistx/pulsarix-widget/server` exports `signPulsarixIdentity` and the
|
|
143
|
+
Server helper: `@softistx/pulsarix-widget/server` exports `signPulsarixIdentity`, `pulsarixSettingsFromEnv` (reads `PULSARIX_PROJECT_KEY`, `PULSARIX_IDENTITY_SECRET` and `PULSARIX_API_BASE`, and throws naming the missing ones) and the types `SignPulsarixIdentityOptions` and `PulsarixSettings` (see "Signing the identity on your server").
|
|
144
|
+
|
|
145
|
+
React binding: `@softistx/pulsarix-widget/react` exports `PulsarixWidget`, `usePulsarix` and the types `PulsarixOptions` and `PulsarixWidgetProps` (see "React").
|
|
127
146
|
|
|
128
147
|
`mount`, `defineWidget` (registers the element; `mount` calls it), `PulsarixWidgetElement`,
|
|
129
148
|
`TAG_NAME` (`"pulsarix-widget"`), and the types `MountOptions`,
|
|
@@ -465,3 +484,7 @@ form, the dialog and the screenshot editor need no nonce.
|
|
|
465
484
|
The pulsarix host serves `/widget/v1/loader.js` (short cache) and the hashed bundle it imports
|
|
466
485
|
(long cache). The bundle needs `Access-Control-Allow-Origin: *`. Your CSP needs `script-src` and
|
|
467
486
|
`connect-src` for the pulsarix host.
|
|
487
|
+
|
|
488
|
+
## License
|
|
489
|
+
|
|
490
|
+
MIT, see [LICENSE](LICENSE).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e,n}from"./index.
|
|
1
|
+
import{e,n}from"./index.yfbwd99n.js";import{ce,Gt,Vt}from"./index.zjykrx6y.js";import{ee}from"./index.3pn4wy4j.js";import{Fn,Lt}from"./index.d8b8y928.js";var l=Fn().RailroadAbnf.parser.LangiumParser,s=e((r)=>{let t=r.alternatives.map(p);if(t.length===1)return t[0];return{type:"choice",alternatives:t}},"transformAlternation"),p=e((r)=>{let t=r.elements.map(f);if(t.length===1)return t[0];return{type:"sequence",elements:t}},"transformConcatenation"),u=e((r)=>{if(r.includes("*")){let[a,o]=r.split("*"),i=a?parseInt(a,10):0,m=o?parseInt(o,10):1/0;return{min:i,max:m}}let t=parseInt(r,10);return{min:t,max:t}},"parseRepeat"),f=e((r)=>{let t=c(r.primary);if(!r.repeat)return t;let{min:a,max:o}=u(r.repeat);if(a===0&&o===1)return{type:"optional",element:t};return{type:"repetition",element:t,min:a,max:o}},"transformElement"),c=e((r)=>{switch(r.$type){case"AbnfStringLiteral":return{type:"terminal",value:r.value};case"AbnfNumVal":return{type:"terminal",value:r.value};case"AbnfRuleName":return{type:"nonterminal",name:r.name};case"AbnfGroup":return s(r.element);case"AbnfOptionalGroup":return{type:"optional",element:s(r.element)};default:throw Error(`Unsupported ABNF primary node: ${r.$type}`)}},"transformPrimary"),d=e((r)=>({name:r.name,definition:s(r.definition)}),"transformRule"),v=e((r)=>{if(ee(r,ce),r.title)ce.setTitle(r.title);r.rules.map((t)=>ce.addRule(d(t)))},"populateDb"),g={parse:e((r)=>{ce.clear(),n.debug("[ABNF Parser] Starting Langium parse");let t=l.parse(r);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new Lt(t);let a=t.value;n.debug("[ABNF Parser] Parsed rules:",a.rules.length),v(a),n.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:ce}},E={parser:g,db:ce,renderer:Vt,styles:Gt};export{E as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ns}from"./index.d8b8y928.js";export{ns as createArchitectureServices};
|