@softistx/pulsarix-widget 0.8.5 → 0.10.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.
Files changed (135) hide show
  1. package/README.md +76 -48
  2. package/dist/chunks/{abnfDiagram-XWFEHMT6.b9yk4x5x.js → abnfDiagram-XWFEHMT6.rxx9wyp3.js} +1 -1
  3. package/dist/chunks/architecture-WOLXFQ4H.hwrxbct0.js +1 -0
  4. package/dist/chunks/architectureDiagram-CSQXQB3N.mrm0pgc0.js +36 -0
  5. package/dist/chunks/{blockDiagram-BEDRHYPZ.bb08b9nt.js → blockDiagram-BEDRHYPZ.f4dfpk7e.js} +11 -11
  6. package/dist/chunks/{c4Diagram-M2UUVUY5.px0epccd.js → c4Diagram-M2UUVUY5.rz43j1my.js} +3 -3
  7. package/dist/chunks/{chat-markdown-CrbWbK1O.k4nmgyey.js → chat-markdown-BSu4FB_l.xgn4yj83.js} +29 -29
  8. package/dist/chunks/{classDiagram-v2-KXABOMEV.f02387t9.js → classDiagram-v2-KXABOMEV.m96cfcad.js} +8 -8
  9. package/dist/chunks/cose-bilkent-JH36ORCC.zz2rwyw6.js +1 -0
  10. package/dist/chunks/cynefin-EF2NZ3EQ.y29bn1cz.js +1 -0
  11. package/dist/chunks/{cynefinDiagram-NJNITYFG.zt7gprt1.js → cynefinDiagram-NJNITYFG.az2k68wq.js} +1 -1
  12. package/dist/chunks/{dagre-KIHZ2IZ3.702bqbr9.js → dagre-KIHZ2IZ3.mgwg8bc4.js} +2 -2
  13. package/dist/chunks/{diagram-7YQZDPLS.m7vf21j6.js → diagram-7YQZDPLS.x8fg6705.js} +2 -2
  14. package/dist/chunks/{diagram-QBROCOUO.33e5hv7x.js → diagram-QBROCOUO.db60dsss.js} +24 -24
  15. package/dist/chunks/{diagram-RJJCUUZO.94k74bz7.js → diagram-RJJCUUZO.a7e9w297.js} +4 -4
  16. package/dist/chunks/{diagram-WERXNKYE.7fe849z6.js → diagram-WERXNKYE.a04f53kd.js} +2 -2
  17. package/dist/chunks/diagram-YHHI257C.v19jhmrh.js +3 -0
  18. package/dist/chunks/{diagram-YR4HJLHV.310x2we2.js → diagram-YR4HJLHV.c5e87gmw.js} +1 -1
  19. package/dist/chunks/{ebnfDiagram-N527522P.a4crteq1.js → ebnfDiagram-N527522P.bjrxfgze.js} +1 -1
  20. package/dist/chunks/editor-shortcuts-dialog-Cz3T8435.5ve4nsaw.js +1 -0
  21. package/dist/chunks/editor.yak1qktd.js +4 -0
  22. package/dist/chunks/{elk-O5DQBFGD.dx61etan.js → elk-O5DQBFGD.1ydp0b7a.js} +13 -13
  23. package/dist/chunks/emoji-picker-00Bw2c2b.gzznrrz5.js +4 -0
  24. package/dist/chunks/{erDiagram-K3K3BIDK.qzqv67zm.js → erDiagram-K3K3BIDK.g171ckq1.js} +8 -8
  25. package/dist/chunks/eventmodeling-K75KTNOO.46qfxqj7.js +1 -0
  26. package/dist/chunks/{flow-diagram-AiM6FiIm.73jr19pb.js → flow-diagram-DGZOc1z1.3gbgbm5m.js} +6 -6
  27. package/dist/chunks/flowDiagram-Z6JWZHQI.f0eaj70g.js +1 -0
  28. package/dist/chunks/{ganttDiagram-3PRQTZWP.xngzb32h.js → ganttDiagram-3PRQTZWP.3b9dh4nr.js} +5 -5
  29. package/dist/chunks/gitGraph-VSP46ZUC.swware7n.js +1 -0
  30. package/dist/chunks/{gitGraphDiagram-VXDFKS5L.1sm36z2q.js → gitGraphDiagram-VXDFKS5L.thyp7vsd.js} +22 -22
  31. package/dist/chunks/{grid-E2QIVN74.76pgtn2n.js → grid-E2QIVN74.entqjpa3.js} +1 -1
  32. package/dist/chunks/illustration-BcaGDjvB.1q9xtmyq.js +1 -0
  33. package/dist/chunks/{index.r0p3fm9f.js → index.0g1t1pjx.js} +1 -1
  34. package/dist/chunks/{index.rfyzb2yv.js → index.35d4zbh8.js} +4 -4
  35. package/dist/chunks/index.5fcbba6e.js +2 -0
  36. package/dist/chunks/{index.7gxz6d1f.js → index.6pzexww5.js} +10 -10
  37. package/dist/chunks/{index.zm5x44tn.js → index.8vaktk8x.js} +1 -1
  38. package/dist/chunks/{index.dnnzjw18.js → index.8zg579vd.js} +2 -2
  39. package/dist/chunks/{index.0k4tbjhp.js → index.9n1y396a.js} +1 -1
  40. package/dist/chunks/{index.8f3x951p.js → index.a3njhfdd.js} +2 -2
  41. package/dist/chunks/{index.a6rz456z.js → index.cw97ff3b.js} +2 -2
  42. package/dist/chunks/{index.fv9af3wd.js → index.d57x7pg9.js} +6 -6
  43. package/dist/chunks/{index.fbeztcp3.js → index.g2ba0pke.js} +2 -2
  44. package/dist/chunks/index.h1xzvasx.js +2 -0
  45. package/dist/chunks/{index.hvdnkr5m.js → index.qr6a02kx.js} +2 -2
  46. package/dist/chunks/index.rkgfxpm3.js +44 -0
  47. package/dist/chunks/index.sw8gvntb.js +2 -0
  48. package/dist/chunks/{index.0e4s8r4m.js → index.v02zf4zg.js} +2 -2
  49. package/dist/chunks/{index.t34t6kpe.js → index.w1516g8q.js} +35 -35
  50. package/dist/chunks/{index.9bf5qrah.js → index.w4emtsqw.js} +2 -2
  51. package/dist/chunks/{index.nsckd1vt.js → index.yhmqh641.js} +2 -2
  52. package/dist/chunks/{index.1d7qpsyx.js → index.zkngte5k.js} +2 -2
  53. package/dist/chunks/{index.a1bxkgd3.js → index.zkx4ryzt.js} +104 -104
  54. package/dist/chunks/info-OHQRW6UA.1er9b42t.js +1 -0
  55. package/dist/chunks/{infoDiagram-EZ3ZOAHP.pfd0fjwn.js → infoDiagram-EZ3ZOAHP.833fvq8n.js} +2 -2
  56. package/dist/chunks/{ishikawaDiagram-S3EKX5GW.h5kjez1x.js → ishikawaDiagram-S3EKX5GW.q3evaw24.js} +5 -5
  57. package/dist/chunks/{journeyDiagram-POQNLL5X.55cqc9p0.js → journeyDiagram-POQNLL5X.9werrmpy.js} +5 -5
  58. package/dist/chunks/{kanban-definition-BH5XI6FM.pkdvda4y.js → kanban-definition-BH5XI6FM.f3ssda0m.js} +7 -7
  59. package/dist/chunks/markup-color-chrome-ykGNUl8y.pcgw4znz.js +1 -0
  60. package/dist/chunks/markup-custom-color-MM-HnrqY.sygnt3gs.js +1 -0
  61. package/dist/chunks/mention-list-6cR5VSPa.x0x55xzp.js +1 -0
  62. package/dist/chunks/{mermaid.core.j7s05j63.js → mermaid.core.5cqab0cw.js} +7 -7
  63. package/dist/chunks/{mindmap-definition-WVAN44T4.x3jbxvft.js → mindmap-definition-WVAN44T4.pjjxgse0.js} +6 -6
  64. package/dist/chunks/packet-JDAUHWVQ.t5jwb2rb.js +1 -0
  65. package/dist/chunks/panel.2vwd6k3h.js +7 -0
  66. package/dist/chunks/{pegDiagram-D4NLKWP3.xq15gqy9.js → pegDiagram-D4NLKWP3.mdacgbzb.js} +1 -1
  67. package/dist/chunks/pie-XZMESJXO.pe88zesw.js +1 -0
  68. package/dist/chunks/pieDiagram-36ENHN4W.fb0d6a9w.js +39 -0
  69. package/dist/chunks/plated-illustration-pTqcYOQg.6b9fm4a7.js +1 -0
  70. package/dist/chunks/{quadrantDiagram-ZQUDMS73.k28g8jpn.js → quadrantDiagram-ZQUDMS73.m5cgqatg.js} +4 -4
  71. package/dist/chunks/radar-ABXABTNO.jtbddwfq.js +1 -0
  72. package/dist/chunks/railroad-I3PHUGI6.kvyt0f9s.js +1 -0
  73. package/dist/chunks/railroad-abnf-LNEFI6M7.ybx0vspg.js +1 -0
  74. package/dist/chunks/railroad-ebnf-DWYD2UWJ.yx4c4enn.js +1 -0
  75. package/dist/chunks/railroad-peg-JR7BVNR7.mb71eyqe.js +1 -0
  76. package/dist/chunks/{railroadDiagram-JIZHGYPL.e7p2vqgg.js → railroadDiagram-JIZHGYPL.w2e1k61e.js} +1 -1
  77. package/dist/chunks/{render-VIF2ZAQL.w5ytncsg.js → render-VIF2ZAQL.exs2rt60.js} +1 -1
  78. package/dist/chunks/{requirementDiagram-AXW2TVFA.arekdz02.js → requirementDiagram-AXW2TVFA.mrxb120d.js} +4 -4
  79. package/dist/chunks/{sankeyDiagram-FBCJTAIF.1d04xcmb.js → sankeyDiagram-FBCJTAIF.csj5n1sg.js} +6 -6
  80. package/dist/chunks/{sequenceDiagram-3LA2ROMG.j4xywwp1.js → sequenceDiagram-3LA2ROMG.73qx1ab4.js} +11 -11
  81. package/dist/chunks/{sizeCapture-2Q2CQKSF.862bnf6p.js → sizeCapture-2Q2CQKSF.vfe8maj3.js} +1 -1
  82. package/dist/chunks/{stateDiagram-v2-ATKHQDJO.xvvtr0y2.js → stateDiagram-v2-ATKHQDJO.h4grfmy4.js} +8 -8
  83. package/dist/chunks/{swimlanes-YQL5WMAO.dtnjb4xt.js → swimlanes-YQL5WMAO.e2y8jam1.js} +1 -1
  84. package/dist/chunks/swimlanesDiagram-UCCPES4V.dtthssd5.js +8 -0
  85. package/dist/chunks/{timeline-definition-7Z437IG3.zfhqzc4r.js → timeline-definition-7Z437IG3.2zxa6hz5.js} +9 -9
  86. package/dist/chunks/treeView-D4JQ5SDB.3kgztv30.js +1 -0
  87. package/dist/chunks/treemap-SAJKECNS.xj47e2ae.js +1 -0
  88. package/dist/chunks/{usecaseDiagram-RDK6N6HP.ewxnyz4c.js → usecaseDiagram-RDK6N6HP.61cdyktj.js} +57 -57
  89. package/dist/chunks/{vennDiagram-SHRQU5PJ.wkzf1f00.js → vennDiagram-SHRQU5PJ.4tspw3rs.js} +7 -7
  90. package/dist/chunks/wardley-7MLQ67FV.pckbr6zr.js +1 -0
  91. package/dist/chunks/{wardleyDiagram-F3OXNVQS.srjfm4nb.js → wardleyDiagram-F3OXNVQS.q2p8tshx.js} +4 -4
  92. package/dist/chunks/{xychartDiagram-GDYJKCDI.xfa2vexk.js → xychartDiagram-GDYJKCDI.69desp9j.js} +5 -5
  93. package/dist/index.js +48 -21
  94. package/dist/react.js +74 -0
  95. package/dist/server.js +20 -0
  96. package/dist/types/config.d.ts +1 -1
  97. package/dist/types/mount.d.ts +1 -1
  98. package/dist/types/react.d.ts +27 -0
  99. package/dist/types/server.d.ts +15 -0
  100. package/docs/integration.md +109 -36
  101. package/package.json +20 -5
  102. package/dist/chunks/architecture-WOLXFQ4H.aft3rkrr.js +0 -1
  103. package/dist/chunks/architectureDiagram-CSQXQB3N.qz18rz0g.js +0 -36
  104. package/dist/chunks/cose-bilkent-JH36ORCC.azq9k24r.js +0 -1
  105. package/dist/chunks/cynefin-EF2NZ3EQ.dk039jny.js +0 -1
  106. package/dist/chunks/diagram-YHHI257C.qjjjfq7w.js +0 -3
  107. package/dist/chunks/editor-shortcuts-dialog-B0ppoiza.x3p4h07t.js +0 -1
  108. package/dist/chunks/editor.arg3zy29.js +0 -4
  109. package/dist/chunks/emoji-picker-CbvQZ2ZL.nst616hd.js +0 -4
  110. package/dist/chunks/eventmodeling-K75KTNOO.gmm1bcak.js +0 -1
  111. package/dist/chunks/flowDiagram-Z6JWZHQI.fzwqg115.js +0 -1
  112. package/dist/chunks/gitGraph-VSP46ZUC.0m8jykgw.js +0 -1
  113. package/dist/chunks/illustration-BOW28wq5.bkz28k1x.js +0 -1
  114. package/dist/chunks/index.32jxrb9b.js +0 -2
  115. package/dist/chunks/index.7k5v3p25.js +0 -2
  116. package/dist/chunks/index.e35b4yh5.js +0 -44
  117. package/dist/chunks/index.wrjdgn4c.js +0 -2
  118. package/dist/chunks/info-OHQRW6UA.e0a85drn.js +0 -1
  119. package/dist/chunks/markup-color-chrome-ykGNUl8y.0ds56d6x.js +0 -1
  120. package/dist/chunks/markup-custom-color-Dgm2hHI7.7darvajx.js +0 -1
  121. package/dist/chunks/mention-list-CkAUzPBG.mtjgmmzb.js +0 -1
  122. package/dist/chunks/packet-JDAUHWVQ.52409p3r.js +0 -1
  123. package/dist/chunks/panel.9tp7gr60.js +0 -7
  124. package/dist/chunks/pie-XZMESJXO.q5kre8cx.js +0 -1
  125. package/dist/chunks/pieDiagram-36ENHN4W.8h0wam54.js +0 -39
  126. package/dist/chunks/plated-illustration-COZYWJ81.xy7ba5mq.js +0 -1
  127. package/dist/chunks/radar-ABXABTNO.yk872k2n.js +0 -1
  128. package/dist/chunks/railroad-I3PHUGI6.9wfa6vs3.js +0 -1
  129. package/dist/chunks/railroad-abnf-LNEFI6M7.70zznk3b.js +0 -1
  130. package/dist/chunks/railroad-ebnf-DWYD2UWJ.4pvdng0p.js +0 -1
  131. package/dist/chunks/railroad-peg-JR7BVNR7.ev15ebp6.js +0 -1
  132. package/dist/chunks/swimlanesDiagram-UCCPES4V.0q8kd5qn.js +0 -8
  133. package/dist/chunks/treeView-D4JQ5SDB.3fzswdjp.js +0 -1
  134. package/dist/chunks/treemap-SAJKECNS.cgh74bhn.js +0 -1
  135. package/dist/chunks/wardley-7MLQ67FV.6q5tgt0s.js +0 -1
package/README.md CHANGED
@@ -1,34 +1,15 @@
1
1
  # @softistx/pulsarix-widget
2
2
 
3
- An intake widget that lets your users report a problem to your pulsarix project:
3
+ An intake widget that lets your users send a request (a problem, a question or a suggestion) to your pulsarix project:
4
4
  a title, a description and an optional e-mail, with no account. It renders inside a
5
5
  Shadow DOM, so your page's styles and the widget's never touch.
6
6
 
7
7
  ## Install
8
8
 
9
- The package is published on npmjs with restricted access: installing it needs an npm read token for
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
- export NPM_SOFTISTX_READ_TOKEN=<your read token>
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
@@ -48,7 +29,7 @@ and isolated in the widget's shadow root, so it never clashes with the page's ow
48
29
  ```
49
30
 
50
31
  Attributes (all optional but the key): `data-locale` (`en` default, `fr`), `data-theme`
51
- (`light`, `dark`, `auto` default), `data-launcher-side` (`right` default, `left`) and `data-launcher-offset` (a fraction from 0, top, to 1, bottom; `0.5` default),
32
+ (`light`, `dark`, `auto` default), `data-launcher-side` (`right` default, `left`) and `data-launcher-offset` (a fraction from 0, top, to 1, bottom; `0.72` default),
52
33
  `data-accent-color` (a hex seed for the theme; without it the widget wears the host's `@softistx/material` theme, else material's built-in `lavande`), `data-inherit-theme="false"` (never inherit the host's theme; see "Theme"), `data-api-base` (the
53
34
  pulsarix origin; defaults to the host that served the loader), `data-launcher="false"` (no
54
35
  floating button; open it with `window.PulsarixWidget.open()`) or `data-launcher="auto|pill|icon"`
@@ -121,26 +102,64 @@ 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()}>New request</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 type `SignPulsarixIdentityOptions` (see "Signing the identity on your server").
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`,
130
149
  `WidgetHandle`, `WidgetEvent`, `WidgetConfig`, `Locale`, `ThemeMode`, `LauncherMode`,
131
150
  `LauncherPlacement`, `LauncherSide`.
132
151
 
133
- | `MountOptions` | Type | Default |
134
- | -------------- | ------------------------------------------------------------- | ---------------------------------------------------------- |
135
- | `projectKey` | `string` | required; missing reports `pulsarix:error` `config` |
136
- | `apiBase` | `string` | none; required on the npm route |
137
- | `locale` | `"en" \| "fr"` | `"en"` |
138
- | `theme` | `"light" \| "dark" \| "auto"` | `"auto"` |
139
- | `accentColor` | hex string | none: the built-in `lavande` theme |
140
- | `inheritTheme` | `boolean` | `true`: wear the host's `@softistx/material` theme |
141
- | `launcher` | `boolean \| "auto" \| "pill" \| "icon" \| { side?, offset? }` | `{ side: "right", offset: 0.5 }` (`false` removes the tab) |
142
- | `identity` | `string \| null` | none: today's form only (see "Identified reporters") |
143
- | `target` | `Element` | `document.body` |
152
+ | `MountOptions` | Type | Default |
153
+ | -------------- | ------------------------------------------------------------- | ----------------------------------------------------------- |
154
+ | `projectKey` | `string` | required; missing reports `pulsarix:error` `config` |
155
+ | `apiBase` | `string` | none; required on the npm route |
156
+ | `locale` | `"en" \| "fr"` | `"en"` |
157
+ | `theme` | `"light" \| "dark" \| "auto"` | `"auto"` |
158
+ | `accentColor` | hex string | none: the built-in `lavande` theme |
159
+ | `inheritTheme` | `boolean` | `true`: wear the host's `@softistx/material` theme |
160
+ | `launcher` | `boolean \| "auto" \| "pill" \| "icon" \| { side?, offset? }` | `{ side: "right", offset: 0.72 }` (`false` removes the tab) |
161
+ | `identity` | `string \| null` | none: today's form only (see "Identified reporters") |
162
+ | `target` | `Element` | `document.body` |
144
163
 
145
164
  `WidgetHandle`: `open()`, `close()`, `setLauncherVisible(visible)`, `holdLauncher()` (returns a release function), `destroy()`, `identify(token \| null)`, `setTheme(theme)`, `setLocale(locale)`,
146
165
  `setMetadata(metadata \| null)` (see "Changing theme, locale and metadata at run time"), `on(name, callback)` (returns the function that
@@ -188,22 +207,26 @@ works, and its limits: [docs/integration.md](docs/integration.md#9-inheriting-th
188
207
  The launcher is an **edge tab**: a 44 x 44 px icon button (24 x 44 px on phones, 600 px or less, with no peek) docked flush to the viewport edge, rounded on the
189
208
  content side only, with the pulsarix mark and the unread badge. At rest it peeks 6 px less; it slides fully
190
209
  in on hover, focus and while it is dragged. Its label is a tooltip only (hover or keyboard focus, hidden
191
- while dragging and on touch screens), and its accessible name carries the unread count ("Report a
192
- problem, 2 unread requests"). Without an identity token a click opens the report form; with one it opens a
193
- menu with "Report a problem" and "My requests" (unread badge).
210
+ while dragging and on touch screens), and its accessible name carries the unread count ("New
211
+ request, 2 unread requests"). Without an identity token a click opens the report form; with one it opens a
212
+ menu with "New request" and "My requests" (unread badge).
194
213
 
195
214
  You choose where it starts, `launcher: { side: "right" | "left", offset: 0..1 }` (`offset` is a fraction of
196
- the free height, `0.5` by default; script tag: `data-launcher-side`, `data-launcher-offset`). The reporter can move it
215
+ the free height, `0.72` by default; script tag: `data-launcher-side`, `data-launcher-offset`). The reporter can move it
197
216
  along the edge: by dragging it, or with Alt+ArrowUp / Alt+ArrowDown (each move is announced). Their
198
217
  position is saved in `localStorage` for your origin and wins over your starting point; it stays inside the
199
218
  viewport, also when the window is resized. A drag never opens the dialog.
200
219
 
201
220
  `false` removes the tab (`"auto"`, `"pill"` and `"icon"` are still read and give the default tab). With the
202
221
  launcher removed or held hidden, an identified reporter has no way to the requests list: keep it visible for them.
203
- `setLauncherVisible(false)` hides only the launcher, never an open dialog, and `holdLauncher()` hides it the same way while a host's own sticky bar is up (ref-counted, call the returned function to release). It also hides by itself while the host page shows a modal (an element with `aria-modal="true"` or an open `<dialog>`) and shows again once it closes, so the tab never covers a modal's edge; with the script tag it is
222
+ `setLauncherVisible(false)` hides only the launcher, never an open dialog, and `holdLauncher()` hides it the same way while a host's own sticky bar is up (ref-counted, call the returned function to release). It also hides by itself while the host page shows a modal (an element with `aria-modal="true"` or an open `<dialog>`, or a shown `role="dialog"` or `role="alertdialog"`) and shows again once it closes, so the tab never covers a modal's edge (an always-visible non-modal `role="dialog"` keeps it hidden: give such a panel `role="region"` instead); with the script tag it is
204
223
  `window.PulsarixWidget.setLauncherVisible(false)`. Details and examples:
205
224
  [docs/integration.md](docs/integration.md).
206
225
 
226
+ ### The tab's name changed
227
+
228
+ The tab's accessible name is now "New request" (with the unread suffix, "New request, 2 unread requests"); it was "Report a problem". A host selector, test or script that finds the tab by its name must change.
229
+
207
230
  ### Migrating from 0.6 (breaking)
208
231
 
209
232
  The floating round button, its `position` and its offsets are gone:
@@ -216,7 +239,7 @@ The floating round button, its `position` and its offsets are gone:
216
239
  | `--pulsarix-launcher-bottom`, `--pulsarix-launcher-side` | removed: no longer read |
217
240
  | `LauncherOffset`, `Position` types | `LauncherPlacement`, `LauncherSide` |
218
241
 
219
- A host that reserved space for the round button (a right padding, say) no longer needs it: the tab is 44 px
242
+ A host that reserved space for the round button (a right padding, say, or a `pe-6 min-[601px]:pe-12` lane added for the earlier tab) no longer needs it: the tab is 44 px
220
243
  wide (24 px on phones), sits on the edge and the reporter can move it out of the way. To clear a sticky bar, use
221
244
  `holdLauncher()`.
222
245
 
@@ -253,7 +276,7 @@ is kept in the widget's memory and is not written to the page; a token in `data-
253
276
  attribute of the element, so it is visible in the DOM (prefer `identify()` when that matters).
254
277
 
255
278
  - Without a token the dialog is the one report form, and the e-mail field is asked.
256
- - With one, the tab opens a menu with "Report a problem" and "My requests" (no e-mail field). My requests is its own view, with its own title, and one list with
279
+ - With one, the tab opens a menu with "New request" and "My requests" (no e-mail field). My requests is its own view, with its own title, and one list with
257
280
  filter chips and their counts (Open by default, Resolved, Declined, All); requests with
258
281
  unread replies come first, and the list is read again each time the dialog opens.
259
282
  - The tab (in its name) and the My requests menu item show the unread count.
@@ -282,8 +305,9 @@ attribute of the element, so it is visible in the DOM (prefer `identify()` when
282
305
  `pulsarix:unread` with `{ count: 0 }`.
283
306
  - A token the API refuses (expired or forged) shows a message in My requests; reload the page
284
307
  to get a fresh one.
285
- - Everyone (identified or not) can give an optional type (bug, question, suggestion) and an
286
- impact (blocking, annoying, minor) in the form's Details group.
308
+ - Everyone (identified or not) can give an optional request type (Report a problem, Ask a question, Make a suggestion) and an
309
+ impact (blocking, annoying, minor); the impact row appears only once the type is a bug, and a type that is not a bug clears it.
310
+ - The form is one compact two-column grid with no section headings: the title beside the optional e-mail (anonymous reporters; the privacy line sits under that row), then the type, the impact (bug only) and the description on full rows, then the attachments. The type comes first and words the description: "What happened?" for a problem, "Your question", "Your idea", or "Your request" when no type is chosen (French: « Que s'est-il passé ? », « Votre question », « Votre idée », « Votre demande »). The launcher, its menu entry and the dialog title all say "New request" (« Nouvelle demande »).
287
311
 
288
312
  ## Signing the identity on your server
289
313
 
@@ -370,10 +394,10 @@ With the npm route, call `widget.identify(token)` on the handle `mount()` return
370
394
  ## Screenshots
371
395
 
372
396
  A report can carry one optional screenshot, never taken without a click (and a per-report
373
- choice). The form has one "Attachments" section that holds both ways to add a picture or a file, with
397
+ choice). The form has one attachments row (no heading) that holds both ways to add a picture or a file, with
374
398
  one list under them:
375
399
 
376
- - **Capture this page** (a choice of the Attachments section's one "Attach" menu): the browser's screen capture (`getDisplayMedia`). The widget hides itself
400
+ - **Capture this page** (a choice of the attachments row's one "Attach" menu): the browser's screen capture (`getDisplayMedia`). The widget hides itself
377
401
  (`visibility`, not unmount, so the form keeps its text) while the frame is grabbed, then shows
378
402
  itself again. Not offered on a phone, without the API, or under a Permissions-Policy that blocks
379
403
  `display-capture`.
@@ -417,7 +441,7 @@ widget.on("pulsarix:error", (event) => console.warn(event.detail.code));
417
441
  ## Attached files
418
442
 
419
443
  Besides the screenshot, a reporter can attach up to 3 files (PNG, JPEG, WebP or PDF, 5 MB each,
420
- 12 MB for the report, screenshot included) by dropping them on the Attachments section or with the "Attach" menu's "Upload a file". The
444
+ 12 MB for the report, screenshot included) by dropping them on the attachments row or with the "Attach" menu's "Upload a file". The
421
445
  checks mirror the API's, so a refused file is shown with its reason and never sent; the list shows
422
446
  each file's type icon, name, size, a thumbnail for images, a Remove button, and its progress while
423
447
  the report goes out.
@@ -425,7 +449,7 @@ the report goes out.
425
449
  - On submit the widget declares the files to `submitClientReport`, then PUTs each one to the signed
426
450
  single-use ticket the API answers (`/public/media/report-files/<slot>`), with progress, and one
427
451
  retry on a network failure or a 5xx. The report itself is already saved by then: if a file
428
- cannot be attached, the confirmation says "Your report was sent, but N of M files could not be
452
+ cannot be attached, the confirmation says "Your request was sent, but N of M files could not be
429
453
  attached" and `pulsarix:submit` lists that file with `uploaded: false`.
430
454
  - Off for one embed with `data-attachments="false"` (`attachments: false` in `init` / `mount`), and
431
455
  off for a key when its project switches attachments off (`widgetConfig.attachments`); the
@@ -465,3 +489,7 @@ form, the dialog and the screenshot editor need no nonce.
465
489
  The pulsarix host serves `/widget/v1/loader.js` (short cache) and the hashed bundle it imports
466
490
  (long cache). The bundle needs `Access-Control-Allow-Origin: *`. Your CSP needs `script-src` and
467
491
  `connect-src` for the pulsarix host.
492
+
493
+ ## License
494
+
495
+ MIT, see [LICENSE](LICENSE).
@@ -1 +1 @@
1
- import{e,n}from"./index.a1bxkgd3.js";import{ce,Gt,Vt}from"./index.rfyzb2yv.js";import{ee}from"./index.r0p3fm9f.js";import{Fn,Lt}from"./index.7gxz6d1f.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};
1
+ import{e,n}from"./index.zkx4ryzt.js";import{se,qt,jt}from"./index.35d4zbh8.js";import{ee}from"./index.0g1t1pjx.js";import{Fn,_t}from"./index.6pzexww5.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,se),r.title)se.setTitle(r.title);r.rules.map((t)=>se.addRule(d(t)))},"populateDb"),g={parse:e((r)=>{se.clear(),n.debug("[ABNF Parser] Starting Langium parse");let t=l.parse(r);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new _t(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:se}},E={parser:g,db:se,renderer:jt,styles:qt};export{E as diagram};
@@ -0,0 +1 @@
1
+ import{ns}from"./index.6pzexww5.js";export{ns as createArchitectureServices};