@unisphere/nx 1.1.3 → 1.1.4
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
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
> This is a temporary documentation to the @unisphere/nx plugin until the official documentation is available.
|
|
4
4
|
|
|
5
|
+
> ⚠️ **This generator is currently available only to Kaltura developers.**
|
|
6
|
+
> It depends on internal resources such as CI/CD templates, design systems, and private NPM packages. External support for Kaltura customers is on our roadmap.
|
|
7
|
+
|
|
5
8
|
Unisphere is Kaltura’s frontend framework for building dynamic, composable experiences. A **Unisphere project** is a structured repository that allows developers to create and organize **applications**, **runtimes**, and **packages** under a single cohesive experience. This setup encourages healthy module separation, runtime decoupling, reusability, and clean ownership boundaries — all key ingredients for scaling product development in a multi-team environment.
|
|
6
9
|
|
|
7
10
|
Whether you're building a full application like _Content Lab_ or a lightweight widget like _Chat_, Unisphere gives you the tooling and conventions to do it the right way from the start.
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
## Step 1 - Create a New Unisphere Project
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
Before creating a new Unisphere project, make sure you have a valid `GITHUB_TOKEN` exported in your environment. This is required for GitHub operations during setup.
|
|
12
15
|
|
|
13
16
|
To scaffold a new project you can use [create-unisphere-project](https://www.npmjs.com/package/create-unisphere-project) npm package with all necessary tooling and structure, run:
|
|
14
17
|
|
|
@@ -16,13 +19,6 @@ To scaffold a new project you can use [create-unisphere-project](https://www.npm
|
|
|
16
19
|
npm create unisphere-project@latest
|
|
17
20
|
```
|
|
18
21
|
|
|
19
|
-
> ⚠️ **This generator is currently available only to Kaltura developers.**
|
|
20
|
-
> It depends on internal resources such as CI/CD templates, design systems, and private NPM packages. External support for Kaltura customers is on our roadmap.
|
|
21
|
-
|
|
22
|
-
**Before running the command**, make sure you have a valid `GITHUB_TOKEN` exported in your environment. This is required for GitHub operations during setup.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
22
|
### Set Up the GitHub Repository
|
|
27
23
|
|
|
28
24
|
Once the project is generated locally, you’ll need to create a new GitHub repository so that CI/CD can operate correctly and your team has proper access.
|
|
@@ -36,7 +32,7 @@ Please contact **Eran Sakal** or **Omri Ceisler** to provision the repository. T
|
|
|
36
32
|
unisphere-{friendly-experience-name}
|
|
37
33
|
```
|
|
38
34
|
|
|
39
|
-
|
|
35
|
+
The friendly name is derived from your declared experience name (e.g., `unisphere.widget.reactions` → `reactions` → `unisphere-reactions` as the repository name).
|
|
40
36
|
|
|
41
37
|
2. **Team Access Configuration**
|
|
42
38
|
The appropriate GitHub teams will be granted access to the repository to match the experience's ownership and collaboration needs.
|
|
@@ -48,7 +44,7 @@ Once created, you can push your local project into the new repository and begin
|
|
|
48
44
|
|
|
49
45
|
---
|
|
50
46
|
|
|
51
|
-
## Use the `@unisphere/nx` Plugin
|
|
47
|
+
## Step 2 - Use the `@unisphere/nx` Plugin
|
|
52
48
|
|
|
53
49
|
After your project is set up, you’ll use the `@unisphere/nx` plugin to generate and manage your project’s core elements. All generators are interactive and designed to enforce Unisphere best practices and conventions.
|
|
54
50
|
|
|
@@ -91,8 +87,6 @@ npx nx g @unisphere/nx:add-runtime
|
|
|
91
87
|
|
|
92
88
|
- Assume it is developed using a playground expo application of another runtime in the project
|
|
93
89
|
|
|
94
|
-
---
|
|
95
|
-
|
|
96
90
|
### 🎨 `add-visual`
|
|
97
91
|
|
|
98
92
|
Creates a **visual component** within a runtime — the building blocks of your UI.
|
|
@@ -108,8 +102,6 @@ npx nx g @unisphere/nx:add-visual
|
|
|
108
102
|
- **Is this visual limited to a single occurrence?**
|
|
109
103
|
Choose `Yes` for singleton visuals (e.g., when the visual represent a container that can only have one instance), otherwise `No`.
|
|
110
104
|
|
|
111
|
-
---
|
|
112
|
-
|
|
113
105
|
### 📱 `add-application`
|
|
114
106
|
|
|
115
107
|
Creates an **application** that acts as a host for your runtime(s). These apps can be used for development, standalone deployments, or iframe integrations. The application can be used as a playground for developing and simulating a host environment without the need to deploy the experience to a customer, or it can be an additional entry point for the experience and use the Unisphere ci/cd to be publically available in multi region environments.
|
|
@@ -133,8 +125,6 @@ npx nx g @unisphere/nx:add-application
|
|
|
133
125
|
|
|
134
126
|
- **HTML page title** (if not using Playground)
|
|
135
127
|
|
|
136
|
-
---
|
|
137
|
-
|
|
138
128
|
### 📦 `add-package`
|
|
139
129
|
|
|
140
130
|
Creates a shared **package** for separating concerns within an experience. Most of the actual code in a Unisphere project lives in packages — not in runtimes — making it easier to reuse components, services, and logic across multiple entry points. These packages are usually not distributed externally but serve as internal modules consumed by runtimes.
|
|
@@ -161,8 +151,6 @@ npx nx g @unisphere/nx:add-package
|
|
|
161
151
|
- **Internal** - Published to GitHub packages (`@kaltura/unisphere-<experience-name>-<package-name>`)
|
|
162
152
|
- **Public** - Published to npm (`@unisphere/<experience-name>-<package-name>`)
|
|
163
153
|
|
|
164
|
-
---
|
|
165
|
-
|
|
166
154
|
## Best Practices
|
|
167
155
|
|
|
168
156
|
🧠 Use descriptive names that reflect the purpose of the runtime or visual. For example, use `player-plugin` for a runtime that integrates into a video player, or `container` for visual that represent a container that can only have one instance, or `drawer` if it is a drawer runtime.
|
|
@@ -173,8 +161,6 @@ npx nx g @unisphere/nx:add-package
|
|
|
173
161
|
|
|
174
162
|
🔍 Use the interactive CLI mode to generate all project elements. This ensures naming consistency, correct scaffolding, and alignment with Unisphere conventions.
|
|
175
163
|
|
|
176
|
-
---
|
|
177
|
-
|
|
178
164
|
## What’s Next?
|
|
179
165
|
|
|
180
166
|
Stay tuned for full documentation on each concept and tool at
|
package/dist/generators/add-application/templates/interactive-playground/src/app/app.tsx.template
CHANGED
|
@@ -5,7 +5,7 @@ import { ConfigurationContext } from './configuration-provider';
|
|
|
5
5
|
import { isConfigurationValid } from './definitions';
|
|
6
6
|
import { Header } from './components/header';
|
|
7
7
|
import { ConfigurationProvider } from './configuration-provider';
|
|
8
|
-
import { UnisphereProvider } from '@unisphere/runtime-react';
|
|
8
|
+
import { UnisphereProvider, UnisphereRuntimeVisual } from '@unisphere/runtime-react';
|
|
9
9
|
import { UnisphereWorkspaceConfig } from '@unisphere/runtime';
|
|
10
10
|
import { UnisphereWorkspaceType } from '@unisphere/runtime';
|
|
11
11
|
import { <%= runtimeName__pascalCase %>Runtime } from '<%= coreAlias %>';
|
|
@@ -92,11 +92,15 @@ export const SettingsForm: React.FC = () => {
|
|
|
92
92
|
name={'settings'}
|
|
93
93
|
fullWidth
|
|
94
94
|
inputProps={{
|
|
95
|
-
...register('settings', {
|
|
95
|
+
...register('settings', {
|
|
96
|
+
required: `To pass empty settings, type "{}". Otherwise: (1) manually type valid JSON. (2) `,
|
|
97
|
+
}),
|
|
96
98
|
}}
|
|
97
99
|
label={'Unisphere Settings'}
|
|
98
|
-
helperText={
|
|
99
|
-
|
|
100
|
+
helperText={`${
|
|
101
|
+
errors?.settings?.message || ''
|
|
102
|
+
}Easily copy settings from Unisphere by entering a workable host in NVQ2 and then do: Unisphere cmd+k > Manage Workspace Runtimes > show ... (actions) of desired runtime > copy settings`}
|
|
103
|
+
error={!!errors?.settings?.message}
|
|
100
104
|
/>
|
|
101
105
|
</FormCard>
|
|
102
106
|
</Stack>
|