@open-pioneer/runtime 4.8.0 → 4.9.0-dev.20260930055642

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 (2) hide show
  1. package/CHANGELOG.md +179 -173
  2. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @open-pioneer/runtime
2
2
 
3
+ ## 4.9.0-dev.20260930055642
4
+
5
+ ### Minor Changes
6
+
7
+ - 6145961: Update @formatjs/intl to version 6
8
+
3
9
  ## 4.8.0
4
10
 
5
11
  ### Minor Changes
@@ -19,12 +25,12 @@
19
25
  - e433296: Update Chakra UI to 3.36.1
20
26
  - 278515d: Add `runtime.LocaleService` and opt-in reactive locale switching.
21
27
 
22
- You can opt-in by configuring the property `advanced.enableLiveLocaleChanges` when calling `createCustomElement`.
23
- Once enabled, locale switches can be done without restarting the application.
24
- Use `LocaleService.changeLocale` to update the application's locale.
28
+ You can opt-in by configuring the property `advanced.enableLiveLocaleChanges` when calling `createCustomElement`.
29
+ Once enabled, locale switches can be done without restarting the application.
30
+ Use `LocaleService.changeLocale` to update the application's locale.
25
31
 
26
- Also export `parseLocale` and `tryParseLocale` algorithms.
27
- These can be used to construct a (cleaned up) `Intl.Locale` object from a string.
32
+ Also export `parseLocale` and `tryParseLocale` algorithms.
33
+ These can be used to construct a (cleaned up) `Intl.Locale` object from a string.
28
34
 
29
35
  ### Patch Changes
30
36
 
@@ -43,15 +49,15 @@
43
49
  - 05425c6: runtime - Introduce support for ServiceFactories, to provide constructor indirection during service creation
44
50
  - 63db133: Support for hot reloading of i18n messages (requires updated vite plugin).
45
51
  When i18n messages are updated:
46
- - React components rerender automatically with new `intl` object returned by `useIntl()`.
47
- - Services that use the new `serviceOptions.currentIntl` interface also receive a new `intl` object (if they are watching for changes).
48
- - Services that that still use the deprecated `serviceOptions.intl` interface cause the application to reload instead.
52
+ - React components rerender automatically with new `intl` object returned by `useIntl()`.
53
+ - Services that use the new `serviceOptions.currentIntl` interface also receive a new `intl` object (if they are watching for changes).
54
+ - Services that that still use the deprecated `serviceOptions.intl` interface cause the application to reload instead.
49
55
 
50
56
  ### Patch Changes
51
57
 
52
58
  - e6db101: Update to Chakra UI 3.35.0
53
- - update to Chakra UI @ 3.35.0, Ark UI @ 5.36.2, Zag JS @ 1.40.0
54
- - use TooltipProviderProps to override `openDelay` globally (instead of Tooltip snippet)
59
+ - update to Chakra UI @ 3.35.0, Ark UI @ 5.36.2, Zag JS @ 1.40.0
60
+ - use TooltipProviderProps to override `openDelay` globally (instead of Tooltip snippet)
55
61
 
56
62
  - b092b75: Declare css property `color-scheme` on the application root. This can be used by the browser to render builtin controls differently.
57
63
 
@@ -60,9 +66,9 @@
60
66
  ### Minor Changes
61
67
 
62
68
  - 89d743b: Provide `runtime.ThemeService`:
63
- - Supports switching between color modes `light` and `dark`.
64
- - Supports changing the chakra theme ("systemConfig") at runtime.
65
- - Supports reactive access to the preferred (system) color mode.
69
+ - Supports switching between color modes `light` and `dark`.
70
+ - Supports changing the chakra theme ("systemConfig") at runtime.
71
+ - Supports reactive access to the preferred (system) color mode.
66
72
 
67
73
  - 89d743b: Support for color modes (light and dark).
68
74
  The default color mode remains `light` for backwards compatibility.
@@ -111,7 +117,7 @@
111
117
 
112
118
  - b7a854d: Update dependencies
113
119
  - 3881d08: - Update Chakra UI from 3.22.0 to 3.24.2
114
- - Update to latest Chakra snippets
120
+ - Update to latest Chakra snippets
115
121
  - adf277b: Update dependencies
116
122
 
117
123
  ## 4.0.0
@@ -121,41 +127,41 @@
121
127
  - 9f074d8: Update to Chakra 3.x
122
128
  - 53c92ba: Introduce an advanced option to disable the shadow root.
123
129
 
124
- By default, trails applications use a shadow root to avoid conflicts (e.g. styles) with other parts of the site where the application may be embedded.
125
-
126
- Applications that use the entire browser viewport may not need this feature, since there may be no "other" parts that may conflict with the app. In this case, you can disable the shadow root by setting this property to `false`.
127
- - New option `advanced.enableShadowRoot`:
130
+ By default, trails applications use a shadow root to avoid conflicts (e.g. styles) with other parts of the site where the application may be embedded.
128
131
 
129
- ```ts
130
- import { createCustomElement } from "@open-pioneer/runtime";
131
- import * as appMetadata from "open-pioneer:app";
132
- import { AppUI } from "./AppUI";
132
+ Applications that use the entire browser viewport may not need this feature, since there may be no "other" parts that may conflict with the app. In this case, you can disable the shadow root by setting this property to `false`.
133
+ - New option `advanced.enableShadowRoot`:
133
134
 
134
- const element = createCustomElement({
135
- component: AppUI,
136
- appMetadata,
137
- advanced: {
138
- enableShadowRoot: false
139
- }
140
- });
141
-
142
- customElements.define("no-shadowroot-sample", element);
143
- ```
135
+ ```ts
136
+ import { createCustomElement } from "@open-pioneer/runtime";
137
+ import * as appMetadata from "open-pioneer:app";
138
+ import { AppUI } from "./AppUI";
139
+
140
+ const element = createCustomElement({
141
+ component: AppUI,
142
+ appMetadata,
143
+ advanced: {
144
+ enableShadowRoot: false,
145
+ },
146
+ });
147
+
148
+ customElements.define("no-shadowroot-sample", element);
149
+ ```
144
150
 
145
- - **Breaking:** As a consequence, the `ApplicationContext`'s `getShadowRoot()` method will now return `undefined` if the shadow root is disabled (previous: always a `ShadowRoot`):
151
+ - **Breaking:** As a consequence, the `ApplicationContext`'s `getShadowRoot()` method will now return `undefined` if the shadow root is disabled (previous: always a `ShadowRoot`):
146
152
 
147
- ```ts
148
- const ctx: ApplicationContext = ...; // injected
149
- const shadowRoot = ctx.getShadowRoot(); // ShadowRoot | undefined
150
- ```
153
+ ```ts
154
+ const ctx: ApplicationContext = ...; // injected
155
+ const shadowRoot = ctx.getShadowRoot(); // ShadowRoot | undefined
156
+ ```
151
157
 
152
- - New method on the `ApplicationContext` that returns _either_ the `ShadowRoot` _or_ the `Document` (if the shadow root is disabled):
158
+ - New method on the `ApplicationContext` that returns _either_ the `ShadowRoot` _or_ the `Document` (if the shadow root is disabled):
153
159
 
154
- ```ts
155
- const ctx: ApplicationContext = ...; // injected
156
- const root = ctx.getRoot(); // Document | ShadowRoot
157
- root.getElementById("...") // always works
158
- ```
160
+ ```ts
161
+ const ctx: ApplicationContext = ...; // injected
162
+ const root = ctx.getRoot(); // Document | ShadowRoot
163
+ root.getElementById("...") // always works
164
+ ```
159
165
 
160
166
  - 9f074d8: **Breaking:** Rename `theme` option of `createCustomElement()` to `chakraSystemConfig`.
161
167
 
@@ -171,54 +177,54 @@
171
177
  In addition to primitive values, rich text formatting supports react values and custom react tags.
172
178
  It always returns a react node, so can only be used in combination with react components.
173
179
 
174
- _Example with react node as value:_
175
-
176
- ```tsx
177
- function Example() {
178
- const intl = useIntl();
179
- // Given i18n message "Hello, {name}!"
180
- // replaces 'name' with the given react node:
181
- const message = intl.formatRichMessage(
182
- { id: "foo" },
183
- {
184
- name: <FancyUserName />
185
- }
186
- );
187
- return <Box>{message}</Box>;
188
- }
189
- ```
190
-
191
- _Example with basic formatting:_
192
-
193
- ```tsx
194
- function Example() {
195
- const intl = useIntl();
196
- // Given i18n message "Hello, <strong>{name}</strong>!"
197
- // renders with actual <strong> html node:
198
- return <Box>{intl.formatRichMessage({ id: "foo" }, { name: "User" })}</Box>;
199
- }
200
- ```
201
-
202
- Note that only a few basic formatting tags are predefined ("b", "strong", "i", "em", "code", "br").
203
- If you need more advanced tags, you can define your own, see below.
204
- _Example with custom tag:_
205
-
206
- ```tsx
207
- function Example() {
208
- const intl = useIntl();
209
- // Given i18n message "Open <foo>the door</foo>!",
210
- // renders 'foo' using the formatter function below:
211
- const message = intl.formatRichMessage(
212
- { id: "foo" },
213
- {
214
- foo: (parts) => <FancyTag>{parts}</FancyTag>
215
- }
216
- );
217
- return <Box>{message}</Box>;
218
- }
219
- ```
220
-
221
- The TypeScript signature for the `intl.formatMessage()` function has been made a little bit stricter compared with FormatJS: only primitive values are allowed for the `values` argument (this should not affect users in practice).
180
+ _Example with react node as value:_
181
+
182
+ ```tsx
183
+ function Example() {
184
+ const intl = useIntl();
185
+ // Given i18n message "Hello, {name}!"
186
+ // replaces 'name' with the given react node:
187
+ const message = intl.formatRichMessage(
188
+ { id: "foo" },
189
+ {
190
+ name: <FancyUserName />,
191
+ },
192
+ );
193
+ return <Box>{message}</Box>;
194
+ }
195
+ ```
196
+
197
+ _Example with basic formatting:_
198
+
199
+ ```tsx
200
+ function Example() {
201
+ const intl = useIntl();
202
+ // Given i18n message "Hello, <strong>{name}</strong>!"
203
+ // renders with actual <strong> html node:
204
+ return <Box>{intl.formatRichMessage({ id: "foo" }, { name: "User" })}</Box>;
205
+ }
206
+ ```
207
+
208
+ Note that only a few basic formatting tags are predefined ("b", "strong", "i", "em", "code", "br").
209
+ If you need more advanced tags, you can define your own, see below.
210
+ _Example with custom tag:_
211
+
212
+ ```tsx
213
+ function Example() {
214
+ const intl = useIntl();
215
+ // Given i18n message "Open <foo>the door</foo>!",
216
+ // renders 'foo' using the formatter function below:
217
+ const message = intl.formatRichMessage(
218
+ { id: "foo" },
219
+ {
220
+ foo: (parts) => <FancyTag>{parts}</FancyTag>,
221
+ },
222
+ );
223
+ return <Box>{message}</Box>;
224
+ }
225
+ ```
226
+
227
+ The TypeScript signature for the `intl.formatMessage()` function has been made a little bit stricter compared with FormatJS: only primitive values are allowed for the `values` argument (this should not affect users in practice).
222
228
 
223
229
  ### Patch Changes
224
230
 
@@ -229,13 +235,13 @@
229
235
  ### Major Changes
230
236
 
231
237
  - 9477e54: Update dependencies
232
- - React 19
233
- - Vite 6
234
- - FormatJS 3
235
- - Open Pioneer Build Tools
236
- - ...
238
+ - React 19
239
+ - Vite 6
240
+ - FormatJS 3
241
+ - Open Pioneer Build Tools
242
+ - ...
237
243
 
238
- For more details, see https://github.com/open-pioneer/trails-core-packages/pull/81
244
+ For more details, see https://github.com/open-pioneer/trails-core-packages/pull/81
239
245
 
240
246
  ## 2.4.0
241
247
 
@@ -276,7 +282,7 @@
276
282
  ### Patch Changes
277
283
 
278
284
  - e945264: Improve error message when metadata is missing (#55)
279
- - @open-pioneer/runtime-react-support@1.0.2
285
+ - @open-pioneer/runtime-react-support@1.0.2
280
286
 
281
287
  ## 2.1.5
282
288
 
@@ -287,16 +293,16 @@
287
293
  Note that with the current implementation, the application will simply restart with the new locale.
288
294
  The application's state will be lost.
289
295
 
290
- Example:
296
+ Example:
291
297
 
292
- ```ts
293
- import { ApplicationContext } from "@open-pioneer/runtime";
298
+ ```ts
299
+ import { ApplicationContext } from "@open-pioneer/runtime";
294
300
 
295
- const appCtx: ApplicationContext = ...; // injected
296
- appCtx.setLocale("en-US");
297
- ```
301
+ const appCtx: ApplicationContext = ...; // injected
302
+ appCtx.setLocale("en-US");
303
+ ```
298
304
 
299
- - @open-pioneer/runtime-react-support@1.0.2
305
+ - @open-pioneer/runtime-react-support@1.0.2
300
306
 
301
307
  ## 2.1.4
302
308
 
@@ -318,7 +324,7 @@
318
324
  ### Patch Changes
319
325
 
320
326
  - f749d96: Add a hint that `DECLARE_SERVICE_INTERFACE` should be imported via `import type`.
321
- - @open-pioneer/runtime-react-support@1.0.0
327
+ - @open-pioneer/runtime-react-support@1.0.0
322
328
 
323
329
  ## 2.1.0
324
330
 
@@ -326,46 +332,46 @@
326
332
 
327
333
  - 80cd62d: Improve TypeScript integration for service classes.
328
334
 
329
- Add a way for a service class to specify its interface name directly.
330
- Usually services used across package boundaries split their public interface and their implementation such as this:
335
+ Add a way for a service class to specify its interface name directly.
336
+ Usually services used across package boundaries split their public interface and their implementation such as this:
331
337
 
332
- ```ts
333
- // Exported from package
334
- interface MyService extends DeclaredService<"my-package.SomeInterface"> {
335
- method(): void;
336
- }
338
+ ```ts
339
+ // Exported from package
340
+ interface MyService extends DeclaredService<"my-package.SomeInterface"> {
341
+ method(): void;
342
+ }
337
343
 
338
- // In an implementation file, usually private.
339
- class MyServiceImpl implements MyService {
340
- method(): void {
341
- // ...
342
- }
344
+ // In an implementation file, usually private.
345
+ class MyServiceImpl implements MyService {
346
+ method(): void {
347
+ // ...
343
348
  }
344
- ```
349
+ }
350
+ ```
345
351
 
346
- Until now, there was no way for a service class to declare its interface directly.
347
- This could be convenient within a package, or with a group of tightly coupled packages:
352
+ Until now, there was no way for a service class to declare its interface directly.
353
+ This could be convenient within a package, or with a group of tightly coupled packages:
348
354
 
349
- ```ts
350
- // Error: Type 'MyServiceImpl' has no properties in common with type 'DeclaredService<"my-package.InterfaceName">'.
351
- class MyServiceImpl implements DeclaredService<"my-package.InterfaceName"> {
352
- method() {}
353
- }
354
- ```
355
+ ```ts
356
+ // Error: Type 'MyServiceImpl' has no properties in common with type 'DeclaredService<"my-package.InterfaceName">'.
357
+ class MyServiceImpl implements DeclaredService<"my-package.InterfaceName"> {
358
+ method() {}
359
+ }
360
+ ```
355
361
 
356
- From now on, you can write this instead:
362
+ From now on, you can write this instead:
357
363
 
358
- ```ts
359
- class MyServiceImpl {
360
- // Tells TypeScript which interface name must be used.
361
- // See documentation of `DECLARE_SERVICE_INTERFACE` for more details.
362
- declare [DECLARE_SERVICE_INTERFACE]: "my-package.InterfaceName";
363
-
364
- method(): void {
365
- // ...
366
- }
364
+ ```ts
365
+ class MyServiceImpl {
366
+ // Tells TypeScript which interface name must be used.
367
+ // See documentation of `DECLARE_SERVICE_INTERFACE` for more details.
368
+ declare [DECLARE_SERVICE_INTERFACE]: "my-package.InterfaceName";
369
+
370
+ method(): void {
371
+ // ...
367
372
  }
368
- ```
373
+ }
374
+ ```
369
375
 
370
376
  ### Patch Changes
371
377
 
@@ -385,51 +391,51 @@
385
391
  - 6f954e3: **Breaking Change**: change how services integrate into TypeScript (fixes #22).
386
392
  The old TypeScript integration had unexpected edge cases, see the linked issue.
387
393
 
388
- NOTE: The changes below have no impact on runtime behavior, but they may trigger TypeScript errors in your code.
389
- - To register a service's type with TypeScript, one previously used a block such as this:
394
+ NOTE: The changes below have no impact on runtime behavior, but they may trigger TypeScript errors in your code.
395
+ - To register a service's type with TypeScript, one previously used a block such as this:
390
396
 
391
- ```ts
392
- // OLD! Can be removed
393
- import "@open-pioneer/runtime";
394
- declare module "@open-pioneer/runtime" {
395
- interface ServiceRegistry {
396
- "http.HttpService": HttpService;
397
- }
398
- }
399
- ```
397
+ ```ts
398
+ // OLD! Can be removed
399
+ import "@open-pioneer/runtime";
400
+ declare module "@open-pioneer/runtime" {
401
+ interface ServiceRegistry {
402
+ "http.HttpService": HttpService;
403
+ }
404
+ }
405
+ ```
400
406
 
401
- The new method requires the developer to change the service's declaration.
402
- Simply add `extends DeclaredService<"SERVICE_ID">` to your service interface, where `SERVICE_ID` should match the service's interface name (`"provides"` in `build.config.mjs`).
407
+ The new method requires the developer to change the service's declaration.
408
+ Simply add `extends DeclaredService<"SERVICE_ID">` to your service interface, where `SERVICE_ID` should match the service's interface name (`"provides"` in `build.config.mjs`).
403
409
 
404
- ```diff
405
- + import { DeclaredService } from "@open-pioneer/runtime";
410
+ ```diff
411
+ + import { DeclaredService } from "@open-pioneer/runtime";
406
412
 
407
- - export interface HttpService {
408
- + export interface HttpService extends DeclaredService<"http.HttpService"> {
413
+ - export interface HttpService {
414
+ + export interface HttpService extends DeclaredService<"http.HttpService"> {
409
415
 
410
- - import "@open-pioneer/runtime";
411
- - declare module "@open-pioneer/runtime" {
412
- - interface ServiceRegistry {
413
- - "http.HttpService": HttpService;
414
- - }
415
- - }
416
- ```
416
+ - import "@open-pioneer/runtime";
417
+ - declare module "@open-pioneer/runtime" {
418
+ - interface ServiceRegistry {
419
+ - "http.HttpService": HttpService;
420
+ - }
421
+ - }
422
+ ```
417
423
 
418
- - To use a service from React code (i.e. `useService` and `useServices`), you must now use the explicit service type in the hook's generic parameter list. Otherwise the hook will simply return `unknown`:
424
+ - To use a service from React code (i.e. `useService` and `useServices`), you must now use the explicit service type in the hook's generic parameter list. Otherwise the hook will simply return `unknown`:
419
425
 
420
- ```diff
421
- + import { HttpService } from "@open-pioneer/http";
422
- - const httpService = useService("http.HttpService");
423
- + const httpService = useService<HttpService>("http.HttpService");
424
- ```
426
+ ```diff
427
+ + import { HttpService } from "@open-pioneer/http";
428
+ - const httpService = useService("http.HttpService");
429
+ + const httpService = useService<HttpService>("http.HttpService");
430
+ ```
425
431
 
426
- This change was necessary to fix an issue where the global registration of the service interface (and its association with the string constant) was not available.
432
+ This change was necessary to fix an issue where the global registration of the service interface (and its association with the string constant) was not available.
427
433
 
428
- The system will still check that the provided string matches the string constant used in the service's declaration (`DeclaredService<...>`), so type safety is preserved.
434
+ The system will still check that the provided string matches the string constant used in the service's declaration (`DeclaredService<...>`), so type safety is preserved.
429
435
 
430
- - The types `InterfaceName` and `ServiceType<I>` have been removed. Use explicit service interfaces instead.
431
- - The interfaces `ServiceRegistry` and `PropertiesRegistry` have been removed as global registration is no longer possible.
432
- - The type `RawApplicationProperties` has been removed. Use `ApplicationProperties` instead.
436
+ - The types `InterfaceName` and `ServiceType<I>` have been removed. Use explicit service interfaces instead.
437
+ - The interfaces `ServiceRegistry` and `PropertiesRegistry` have been removed as global registration is no longer possible.
438
+ - The type `RawApplicationProperties` has been removed. Use `ApplicationProperties` instead.
433
439
 
434
440
  ### Patch Changes
435
441
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/runtime",
4
- "version": "4.8.0",
4
+ "version": "4.9.0-dev.20260930055642",
5
5
  "description": "Implements the runtime environment for Open Pioneer Trails apps.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -18,11 +18,11 @@
18
18
  "@conterra/reactivity-core": "^0.8.8",
19
19
  "@emotion/cache": "^11.14.0",
20
20
  "@emotion/react": "^11.14.0",
21
- "@formatjs/intl": "^4.2.0",
22
- "@formatjs/intl-localematcher": "^0.8.13",
23
- "@open-pioneer/base-theme": "4.8.0",
24
- "@open-pioneer/core": "4.8.0",
25
- "@open-pioneer/reactivity": "4.8.0",
21
+ "@formatjs/intl": "^6.1.2",
22
+ "@formatjs/intl-localematcher": "^0.9.0",
23
+ "@open-pioneer/base-theme": "4.9.0-dev.20260930055642",
24
+ "@open-pioneer/core": "4.9.0-dev.20260930055642",
25
+ "@open-pioneer/reactivity": "4.9.0-dev.20260930055642",
26
26
  "react": "^19.3.0",
27
27
  "react-dom": "^19.3.0"
28
28
  },