@eturnity/eturnity_reusable_components 9.37.2 → 9.37.3

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 CHANGED
@@ -10,7 +10,8 @@ npm install @eturnity/eturnity_reusable_components
10
10
 
11
11
  ### Setting up the theme
12
12
 
13
- The library now includes its own theme. You need to wrap your application with the `ThemeProvider` component from this library.
13
+ The library now includes its own theme. You need to wrap your application with
14
+ the `ThemeProvider` component from this library.
14
15
 
15
16
  **Recommended approach - Using the exported theme:**
16
17
 
@@ -66,7 +67,8 @@ import InputText from '@eturnity/eturnity_reusable_components/src/components/inp
66
67
 
67
68
  ### Overriding the theme (optional)
68
69
 
69
- If you need to customize or override the theme, you can pass your own theme when installing the plugin:
70
+ If you need to customize or override the theme, you can pass your own theme when
71
+ installing the plugin:
70
72
 
71
73
  ```javascript
72
74
  import EturnityComponentsPlugin, {
@@ -124,22 +126,32 @@ Customers load provided files from jsDelivr using stable tag-based URLs:
124
126
  <script src="https://cdn.jsdelivr.net/npm/@eturnity/eturnity_reusable_components@latest-consent-bridge/dist/eturnity-consent-bridge.min.js"></script>
125
127
  ```
126
128
 
127
- Consent bridge integration documentation is maintained in `docs/eturnity-consent-bridge.md` and published to:
129
+ Consent bridge integration documentation is maintained in
130
+ `docs/eturnity-consent-bridge.md` and published to:
128
131
 
129
132
  ```text
130
133
  https://cdn.jsdelivr.net/npm/@eturnity/eturnity_reusable_components@latest-consent-bridge/dist/eturnity-consent-bridge.md
131
134
  ```
132
135
 
133
- Provided files and docs are configured in `provided-assets.config.js`. Script and doc entries can both define their own `versionTag` (for example `latest-consent-bridge`). Because customers keep these URLs unchanged, we update what they receive by moving those npm dist-tags to a published package version.
136
+ Provided files and docs are configured in `provided-assets.config.js`. Script
137
+ and doc entries can both define their own `versionTag` (for example
138
+ `latest-consent-bridge`). Because customers keep these URLs unchanged, we update
139
+ what they receive by moving those npm dist-tags to a published package version.
134
140
 
135
141
  ### Build and publish behavior
136
142
 
137
- - `npm run build` runs `vite build` (library), `npm run build:provided-files` (JS CDN bundles), and `npm run copy:provided-docs` (published docs).
138
- - `npm run build:provided-files` builds files listed in `provided-assets.config.js` into `dist/*.min.js`.
139
- - `npm run copy:provided-docs` copies docs listed in `provided-assets.config.js` into `dist/*.md`.
140
- - `npm run verify:provided-files` checks expected provided files exist in `dist/` and are non-empty.
141
- - `npm run verify:provided-docs` checks expected provided docs exist in `dist/` and are non-empty.
142
- - `prepack` and `prepublishOnly` run both verification steps to reduce broken publish risk.
143
+ - `npm run build` runs `vite build` (library), `npm run build:provided-files`
144
+ (JS CDN bundles), and `npm run copy:provided-docs` (published docs).
145
+ - `npm run build:provided-files` builds files listed in
146
+ `provided-assets.config.js` into `dist/*.min.js`.
147
+ - `npm run copy:provided-docs` copies docs listed in `provided-assets.config.js`
148
+ into `dist/*.md`.
149
+ - `npm run verify:provided-files` checks expected provided files exist in
150
+ `dist/` and are non-empty.
151
+ - `npm run verify:provided-docs` checks expected provided docs exist in `dist/`
152
+ and are non-empty.
153
+ - `prepack` and `prepublishOnly` run both verification steps to reduce broken
154
+ publish risk.
143
155
 
144
156
  ### Standard release steps
145
157
 
@@ -149,9 +161,11 @@ Provided files and docs are configured in `provided-assets.config.js`. Script an
149
161
  npm publish
150
162
  ```
151
163
 
152
- 2. Optional: promote provided-asset tag(s) so customer script/doc URLs point to that version.
164
+ 2. Optional: promote provided-asset tag(s) so customer script/doc URLs point to
165
+ that version.
153
166
 
154
- Use this only if you want to update what customers receive from stable CDN tag URLs:
167
+ Use this only if you want to update what customers receive from stable CDN tag
168
+ URLs:
155
169
 
156
170
  Script options (`--dry-run`, `--version=…`, `--name=…`, and combinations)
157
171
 
@@ -196,7 +210,8 @@ Optional tuning via environment variables:
196
210
 
197
211
  ### Optional rollback (re-point customer URL to older stable package)
198
212
 
199
- If a promoted version is broken, you can optionally promote a previously published version:
213
+ If a promoted version is broken, you can optionally promote a previously
214
+ published version:
200
215
 
201
216
  ```bash
202
217
  npm run promote:provided-files-tag -- --version=<older-published-version>
@@ -217,11 +232,19 @@ npm run promote:provided-files-tag -- --version=9.15.2
217
232
 
218
233
  Unit tests are Jest + `@vue/test-utils`, co-located with each component as
219
234
  `componentName.spec.js`. Run a single spec with `pnpm test <path>` or the full
220
- suite with `pnpm test`. See [`docs/component-testing.md`](docs/component-testing.md)
221
- for how we write tests (conventions, the TDD workflow, and using Claude Code).
235
+ suite with `pnpm test`. See
236
+ [`docs/component-testing.md`](docs/component-testing.md) for how we write tests
237
+ (conventions, the TDD workflow, and using Claude Code).
222
238
 
223
239
  ## CI and pull requests
224
240
 
225
- Opening or updating a pull request runs **Bitbucket Pipelines** ([`bitbucket-pipelines.yml`](bitbucket-pipelines.yml)): install with pnpm, **`pnpm test`**, then **`pnpm run build`**. PRs are expected to pass this pipeline.
241
+ Opening or updating a pull request runs **Bitbucket Pipelines**
242
+ ([`bitbucket-pipelines.yml`](bitbucket-pipelines.yml)): install with pnpm,
243
+ **`pnpm test`**, then **`pnpm run build`**. PRs are expected to pass this
244
+ pipeline.
226
245
 
227
- **Blocking merges on failure** is configured in **Bitbucket repository settings** (not in this repo): enable merge checks that require a successful pull-request build—for example a minimum number of successful builds for the PR, or “require passing pipelines” if your plan supports it. Until that is enabled, a red pipeline is visible but may not stop merges automatically.
246
+ **Blocking merges on failure** is configured in **Bitbucket repository
247
+ settings** (not in this repo): enable merge checks that require a successful
248
+ pull-request build—for example a minimum number of successful builds for the PR,
249
+ or “require passing pipelines” if your plan supports it. Until that is enabled,
250
+ a red pipeline is visible but may not stop merges automatically.
@@ -1,20 +1,24 @@
1
1
  # eturnityConsentBridge
2
2
 
3
- Lightweight browser bridge for synchronizing consent-related cookie payloads between a host page and an embedded Eturnity iframe via `postMessage`.
3
+ Lightweight browser bridge for synchronizing consent-related cookie payloads
4
+ between a host page and an embedded Eturnity iframe via `postMessage`.
4
5
 
5
6
  ## Overview
6
7
 
7
- `eturnityConsentBridge` is a public browser/CDN script that exposes a global function:
8
+ `eturnityConsentBridge` is a public browser/CDN script that exposes a global
9
+ function:
8
10
 
9
11
  - `window.eturnityConsentBridge(...)`
10
12
  - `eturnityConsentBridge(...)`
11
13
 
12
- It is designed for third-party embedding on customer websites and supports multiple bridge instances (multiple iframes) on the same page.
14
+ It is designed for third-party embedding on customer websites and supports
15
+ multiple bridge instances (multiple iframes) on the same page.
13
16
 
14
17
  ## Features
15
18
 
16
19
  - Global API for plain HTML and JavaScript-based script injection flows
17
- - Safe message routing per iframe instance using `event.source` and origin checks
20
+ - Safe message routing per iframe instance using `event.source` and origin
21
+ checks
18
22
  - Idempotent initialization for repeated calls with the same iframe ID
19
23
  - Non-throwing input validation (returns `null` on invalid init input)
20
24
  - Cookie fallback persistence and replay on iframe sync-ready handshake
@@ -57,7 +61,8 @@ Initialization returns:
57
61
  - instance object on success
58
62
  - `null` when validation fails
59
63
 
60
- The iframe can be missing at init time; the bridge will keep trying to resolve it during message handling.
64
+ The iframe can be missing at init time; the bridge will keep trying to resolve
65
+ it during message handling.
61
66
 
62
67
  ## Message Contract
63
68
 
@@ -88,9 +93,12 @@ Stored cookie replay can be triggered in two safe ways:
88
93
  - **on init**: right after bridge initialization (`eturnityConsentBridge(...)`)
89
94
  - **on handshake**: when iframe sends `eturnity_<type>_cookie_sync_ready`
90
95
 
91
- The init replay exists to avoid reload race conditions where the iframe handshake might be sent before the host bridge is fully attached.
96
+ The init replay exists to avoid reload race conditions where the iframe
97
+ handshake might be sent before the host bridge is fully attached.
92
98
 
93
- Delete events are also synchronized: when iframe sends `eturnity_<type>_cookie_delete`, host removes that entry from its cache and then emits `eturnity_<type>_cookie_sync` with `{ cookieName, isDeleted: true }`.
99
+ Delete events are also synchronized: when iframe sends
100
+ `eturnity_<type>_cookie_delete`, host removes that entry from its cache and then
101
+ emits `eturnity_<type>_cookie_sync` with `{ cookieName, isDeleted: true }`.
94
102
 
95
103
  ## API
96
104
 
@@ -116,7 +124,8 @@ Destroys one bridge instance.
116
124
 
117
125
  ### `eturnityConsentBridge.destroyAll()`
118
126
 
119
- Destroys all bridge instances and removes the shared `message` listener when no instances remain.
127
+ Destroys all bridge instances and removes the shared `message` listener when no
128
+ instances remain.
120
129
 
121
130
  ### `BridgeInstance.destroy()`
122
131
 
@@ -132,7 +141,8 @@ type BridgeOptions = {
132
141
  ```
133
142
 
134
143
  - **`type`** (required): selects internal message/cookie namespace
135
- - **`logs`** (optional, default `false`): enables verbose console logging for this instance
144
+ - **`logs`** (optional, default `false`): enables verbose console logging for
145
+ this instance
136
146
 
137
147
  Unknown option keys are ignored.
138
148
 
@@ -185,7 +195,8 @@ eturnityConsentBridge.destroyAll()
185
195
  ### `Iframe ... was not found during initialization`
186
196
 
187
197
  - Verify iframe ID matches exactly.
188
- - If iframe is rendered later, you can initialize early; bridge resolves context again during runtime.
198
+ - If iframe is rendered later, you can initialize early; bridge resolves context
199
+ again during runtime.
189
200
 
190
201
  ### `Could not resolve iframe origin`
191
202
 
@@ -193,15 +204,22 @@ eturnityConsentBridge.destroyAll()
193
204
 
194
205
  ### `Ignoring ... due to origin mismatch`
195
206
 
196
- - Host and iframe messaging origins must match the iframe `src` origin resolved by the bridge.
207
+ - Host and iframe messaging origins must match the iframe `src` origin resolved
208
+ by the bridge.
197
209
 
198
210
  ### Why replay may happen before `cookie_sync_ready`
199
211
 
200
- - This is expected behavior: replay on init is intentional and does not depend on handshake timing.
201
- - In some page-load orders, the iframe can emit `cookie_sync_ready` before the host bridge listener is attached; in that case you may not see a handshake log.
202
- - This does not break integration: the iframe consumes `eturnity_<type>_cookie_sync` messages directly, and `cookie_sync_ready` is only a replay signal from iframe to host.
212
+ - This is expected behavior: replay on init is intentional and does not depend
213
+ on handshake timing.
214
+ - In some page-load orders, the iframe can emit `cookie_sync_ready` before the
215
+ host bridge listener is attached; in that case you may not see a handshake
216
+ log.
217
+ - This does not break integration: the iframe consumes
218
+ `eturnity_<type>_cookie_sync` messages directly, and `cookie_sync_ready` is
219
+ only a replay signal from iframe to host.
203
220
 
204
221
  ### Cookie warning on non-HTTPS host
205
222
 
206
- - The bridge writes cookies with `Secure`; on non-HTTPS pages browsers may reject persistence.
223
+ - The bridge writes cookies with `Secure`; on non-HTTPS pages browsers may
224
+ reject persistence.
207
225
  - Use HTTPS in production embedding environments.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "9.37.2",
3
+ "version": "9.37.3",
4
4
  "files": [
5
5
  "dist",
6
6
  "src"
@@ -2,6 +2,7 @@
2
2
 
3
3
  colors in icons will be replaced in paths only.
4
4
 
5
- if an svg contain a rect or polygon or circle you want color to be applied on, convert them into path using:
5
+ if an svg contain a rect or polygon or circle you want color to be applied on,
6
+ convert them into path using:
6
7
 
7
8
  https://thednp.github.io/svg-path-commander/convert.html
@@ -65,6 +65,7 @@
65
65
  display: flex;
66
66
  align-items: center;
67
67
  gap: 8px;
68
+ white-space: nowrap;
68
69
  `
69
70
 
70
71
  const Counter = styled.div`
@@ -1,3 +0,0 @@
1
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M7.99988 2C9.38419 2 10.7375 2.41068 11.8885 3.17969C13.0397 3.94883 13.9369 5.04227 14.4667 6.32129C14.9964 7.60027 15.1351 9.00747 14.8651 10.3652C14.6292 11.551 14.0911 12.6534 13.3065 13.5654L13.2294 13.6367C13.0359 13.7809 12.7574 13.7575 12.578 13.5781C12.3736 13.3731 12.3756 13.0424 12.5614 12.8203C13.1208 12.1523 13.5272 11.3687 13.7509 10.5254L13.8358 10.1611C14.0654 9.00695 13.9473 7.80988 13.4969 6.72266C13.0747 5.70353 12.3778 4.82341 11.4862 4.17871L11.3055 4.05273C10.3271 3.399 9.17662 3.0498 7.99988 3.0498C6.82316 3.04985 5.67263 3.39898 4.69421 4.05273C3.71591 4.70646 2.95314 5.63563 2.50281 6.72266L2.42273 6.92773C2.03943 7.95934 1.94869 9.07895 2.16394 10.1611C2.3593 11.143 2.79919 12.0571 3.43835 12.8203C3.62426 13.0425 3.62633 13.3731 3.42175 13.5781L3.33875 13.6455C3.16397 13.7608 2.93614 13.7604 2.77039 13.6367L2.69324 13.5654C2.00668 12.7673 1.50892 11.8234 1.23718 10.8057L1.13464 10.3652C0.881519 9.09233 0.987587 7.77593 1.43835 6.5625L1.53308 6.32129C2.02976 5.12224 2.84939 4.08667 3.89832 3.32812L4.11121 3.17969C5.26224 2.41066 6.61558 2.00004 7.99988 2ZM10.1093 5.1875C10.2817 4.97192 10.5968 4.93699 10.8124 5.10938C11.028 5.28188 11.063 5.59687 10.8905 5.8125L9.12781 8.01465C9.35847 8.27842 9.49988 8.62208 9.49988 9C9.49988 9.82843 8.82831 10.5 7.99988 10.5C7.17154 10.4999 6.49988 9.82836 6.49988 9C6.49988 8.17164 7.17154 7.50011 7.99988 7.5C8.08232 7.5 8.16324 7.50771 8.24207 7.52051L10.1093 5.1875ZM7.99988 8.5C7.72383 8.50011 7.49988 8.72392 7.49988 9C7.49988 9.27608 7.72383 9.49989 7.99988 9.5C8.27602 9.5 8.49988 9.27614 8.49988 9C8.49988 8.72386 8.27602 8.5 7.99988 8.5Z" fill="#263238"/>
3
- </svg>