piral-blazor 1.9.0-beta.8186 → 1.9.0-beta.8196

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/README.md +10 -23
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -94,34 +94,14 @@ There is only a single argument, which refers to the name of the exposed Blazor
94
94
 
95
95
  ## Usage
96
96
 
97
- ::: summary: For pilet authors
97
+ ::: summary: Modern Use (recommended)
98
98
 
99
99
  **Note**: If you use the .NET template (and specifically the `Piral.Blazor.Tools` package) then the whole JavaScript code will be generated for you. There is nothing you will need to do - even though you can also manually extend the generated JavaScript module.
100
100
 
101
- You can use the `fromBlazor` function from the Pilet API to convert your Blazor components to components usable by your Piral instance.
101
+ The recommended way is to use `piral-blazor` from your pilets. In this case, no registration in the Piral instance is required.
102
102
 
103
103
  Example use:
104
104
 
105
- ```ts
106
- import { PiletApi } from '<name-of-piral-instance>';
107
-
108
- export function setup(piral: PiletApi) {
109
- piral.defineBlazorReferences([
110
- require.resolve('./My.Dependency.dll'),
111
- require.resolve('./My.Components.dll'),
112
- ])
113
- piral.registerPage('/sample', piral.fromBlazor('sample-page'));
114
- }
115
- ```
116
-
117
- Within Blazor components the `Extension` component referenced from `Piral.Blazor.Utils`, e.g.,
118
-
119
- ```jsx
120
- <Extension name="name-of-extension" />
121
- ```
122
-
123
- Alternatively, if `piral-blazor` has not been added to the Piral instance you can install and use the package also from a pilet directly.
124
-
125
105
  ```ts
126
106
  import { PiletApi } from '<name-of-piral-instance>';
127
107
  import { defineBlazorReferences, fromBlazor } from 'piral-blazor/convert';
@@ -139,9 +119,16 @@ In this case, you'll also have to install the `blazor` package. `piral-blazor` w
139
119
 
140
120
  To maximize compatibility, the major and minor version of the `blazor` package should correspond to the major and minor version of .NET Blazor you want to use (e.g., `blazor@3.2.x` will resolve to the outdated .NET Blazor `3.2` release train - more recent ones look like `blazor@7.0.0`). It should be noted that the patch level is not aligned. If a specific patch level is desired, consult the `blazor` package documentation.
141
121
 
122
+ Within Blazor components the `Extension` component referenced from `Piral.Blazor.Utils`, e.g.,
123
+
124
+ ```jsx
125
+ <Extension name="name-of-extension" />
126
+ ```
142
127
  :::
143
128
 
144
- ::: summary: For Piral instance developers
129
+ ::: summary: Legacy Use
130
+
131
+ For backwards compatibility, you can also install `piral-blazor` in your Piral instance.
145
132
 
146
133
  Using Blazor with Piral is as simple as installing the `piral-blazor` and `blazor` packages.
147
134
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-blazor",
3
- "version": "1.9.0-beta.8186",
3
+ "version": "1.9.0-beta.8196",
4
4
  "description": "Plugin for integrating Blazor components in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -54,7 +54,7 @@
54
54
  "test": "echo \"Error: run tests from root\" && exit 1"
55
55
  },
56
56
  "devDependencies": {
57
- "piral-core": "1.9.0-beta.8186"
57
+ "piral-core": "1.9.0-beta.8196"
58
58
  },
59
- "gitHead": "ff7d73f1903c20eb9f14e58b21f33d36dee8f572"
59
+ "gitHead": "73f7d0d90884d0b1dc1cc5ed7965f0cb0bc48a20"
60
60
  }