leesto-connect 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Leesto
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # leesto-connect
2
+
3
+ Drop-in connector for the **Leesto / Livery** test shell. Add it to the app you
4
+ want testers to review so Livery can take **screenshots** and record **rrweb
5
+ sessions** of your pages.
6
+
7
+ - **Keyless** — carries no secret; the project binding lives in the Livery test
8
+ session, not in your app. Safe to ship publicly.
9
+ - **No-op unless embedded** — does nothing when your page isn't loaded inside the
10
+ Livery shell, so it's harmless on production.
11
+ - **Lazy** — rrweb / screenshot code load only when a recording or capture
12
+ actually starts, so a normal page load only fetches a ~7.2 kB (gzip) entry.
13
+ - **Origin-locked** — the connector only answers a shell on its allowlist, so a
14
+ third-party page that frames your app cannot drive capture or recording.
15
+
16
+ ## Install (any site — builders, no-code, plain HTML)
17
+
18
+ ```html
19
+ <script type="module"
20
+ src="https://unpkg.com/leesto-connect@0.1.0/dist/leesto-connect.js"
21
+ data-leesto-connect></script>
22
+ ```
23
+
24
+ Pin the version (cache stability). Options via data attributes:
25
+
26
+ - `data-highlight-color="#6B8E23"` — outline color of the element picker.
27
+ - `data-leesto-manual` — skip auto-init; call `window.LeestoConnect.connect()` yourself.
28
+ - `data-shell-origin="https://qa.acme.test"` — **self-hosted shell only.**
29
+ Comma-separated list of origins allowed to drive the connector. Declaring it
30
+ REPLACES the built-in Leesto origins, so only set it if you run your own
31
+ Livery shell.
32
+
33
+ ## Install (React / bundled app)
34
+
35
+ If your app bundles its own dependencies, import the package once in your client
36
+ entry — before mounting React, so startup errors are captured too. The import
37
+ auto-connects; there is no API to call.
38
+
39
+ ```ts
40
+ import "leesto-connect";
41
+ ```
42
+
43
+ ## Security model
44
+
45
+ The connector is keyless, so it does **not** authenticate the shell — it
46
+ authorizes it *by origin*. It answers only origins on its allowlist (the Leesto
47
+ shell by default, or whatever `data-shell-origin` declares) and never posts to a
48
+ wildcard target. That check is what keeps a hostile page that manages to frame
49
+ your app from requesting screenshots, starting a recording, or reading the
50
+ diagnostic buffers.
51
+
52
+ `frame-ancestors` below is still worth setting: it is defence in depth, and the
53
+ only thing that stops an unrelated site from framing your app at all.
54
+
55
+ ## Don't forget the framing header
56
+
57
+ Livery loads your app in an iframe, so your app must allow it:
58
+
59
+ ```
60
+ Content-Security-Policy: frame-ancestors 'self' https://<your-livery-domain>
61
+ ```
62
+
63
+ and remove any restrictive `X-Frame-Options`.
64
+
65
+ ## Releasing
66
+
67
+ `dist/` is built from `@leesto/react` (`build:connect`). To publish a new version:
68
+
69
+ ```sh
70
+ cd packages/leesto-connect
71
+ npm version <patch|minor|major>
72
+ npm publish # prepublishOnly rebuilds dist/ from @leesto/react
73
+ ```
@@ -0,0 +1,45 @@
1
+ # Notices tierces
2
+
3
+ `leesto-connect` est distribué sous licence MIT (voir `LICENSE`). Le bundle
4
+ publié embarque les bibliothèques ci-dessous, chacune sous sa propre licence.
5
+ Ce fichier est **généré** au build depuis les paquets installés — ne pas l'éditer.
6
+
7
+ ## rrweb 2.1.1
8
+
9
+ ```
10
+ MIT License
11
+
12
+ Copyright (c) rrweb Core Team
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
31
+ ```
32
+
33
+ ## modern-screenshot 4.7.0
34
+
35
+ ```
36
+ The MIT License (MIT)
37
+
38
+ Copyright (c) 2021-present wxm
39
+
40
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
41
+
42
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
43
+
44
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45
+ ```