@keadex/mina-live 2.0.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/3rdpartylicenses.txt +65 -0
- package/KFOiCnqEu92Fr1Mu51QrEz0dL_nz.woff2 +0 -0
- package/KFOiCnqEu92Fr1Mu51QrEz4dL_nz.woff2 +0 -0
- package/KFOiCnqEu92Fr1Mu51QrEz8dL_nz.woff2 +0 -0
- package/KFOiCnqEu92Fr1Mu51QrEzAdLw.woff2 +0 -0
- package/KFOiCnqEu92Fr1Mu51QrEzMdL_nz.woff2 +0 -0
- package/KFOiCnqEu92Fr1Mu51QrEzQdL_nz.woff2 +0 -0
- package/KFOiCnqEu92Fr1Mu51QrEzwdL_nz.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TjASc-CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TjASc0CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TjASc1CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TjASc2CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TjASc3CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TjASc5CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TjASc6CsQ.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TzBic-CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TzBic0CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TzBic1CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TzBic2CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TzBic3CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TzBic5CsTKlA.woff2 +0 -0
- package/KFOjCnqEu92Fr1Mu51TzBic6CsQ.woff2 +0 -0
- package/KFOkCnqEu92Fr1MmgVxEIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1MmgVxFIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1MmgVxGIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1MmgVxHIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1MmgVxIIzI.woff2 +0 -0
- package/KFOkCnqEu92Fr1MmgVxLIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1MmgVxMIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1Mu51xEIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1Mu51xFIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1Mu51xGIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1Mu51xHIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1Mu51xIIzI.woff2 +0 -0
- package/KFOkCnqEu92Fr1Mu51xLIzIFKw.woff2 +0 -0
- package/KFOkCnqEu92Fr1Mu51xMIzIFKw.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmSU5fABc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmSU5fBBc4.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmSU5fBxc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmSU5fCBc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmSU5fCRc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmSU5fChc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmSU5fCxc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmWUlfBBc4.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmWUlfBxc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmWUlfCBc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmWUlfCRc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmWUlfChc4EsA.woff2 +0 -0
- package/KFOlCnqEu92Fr1MmWUlfCxc4EsA.woff2 +0 -0
- package/KFOmCnqEu92Fr1Mu4WxKOzY.woff2 +0 -0
- package/KFOmCnqEu92Fr1Mu4mxK.woff2 +0 -0
- package/KFOmCnqEu92Fr1Mu5mxKOzY.woff2 +0 -0
- package/KFOmCnqEu92Fr1Mu72xKOzY.woff2 +0 -0
- package/KFOmCnqEu92Fr1Mu7GxKOzY.woff2 +0 -0
- package/KFOmCnqEu92Fr1Mu7WxKOzY.woff2 +0 -0
- package/KFOmCnqEu92Fr1Mu7mxKOzY.woff2 +0 -0
- package/README.md +164 -0
- package/aa95fb6f4a1ae024f6e1.module.wasm +0 -0
- package/index.css +7035 -0
- package/index.d.ts +3 -0
- package/index.js +1 -0
- package/mina-live-middleware.d.ts +1 -0
- package/mina-live-middleware.js +1 -0
- package/mina-live-plugin.js +1 -0
- package/package.json +109 -0
- package/src/components/MinaLive/LazyMinaLive.d.ts +3 -0
- package/src/components/MinaLive/MinaLive.d.ts +6 -0
- package/src/nextjs/mina-live-middleware.d.ts +2 -0
- package/src/nextjs/mina-live-plugin.d.ts +17 -0
- package/src/tauri/tauri-plugin-adapter.d.ts +2 -0
- package/src/tauri/tauri-web-adapter.d.ts +12 -0
- package/src/tauri/wasm-bridge.d.ts +2 -0
- package/src/webpack/webpack.config.d.ts +15 -0
- package/static/keadex-mina/locales/en/translation.json +242 -0
- package/static/keadex-mina/mina-banner.svg +1 -0
- package/static/keadex-mina/mina-logo-full.png +0 -0
- package/static/keadex-mina/mina-logo-full.svg +1 -0
- package/static/keadex-mina/mina-logo.svg +1 -0
- package/static/keadex-mina/mina-plantuml.png +0 -0
- package/static/keadex-mina/vite.svg +1 -0
- package/static/mina-live-logo.svg +1 -0
- package/webpack.config.js +1 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@babel/runtime
|
|
2
|
+
MIT
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
8
|
+
a copy of this software and associated documentation files (the
|
|
9
|
+
"Software"), to deal in the Software without restriction, including
|
|
10
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
11
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
12
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
13
|
+
the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be
|
|
16
|
+
included in all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
19
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
20
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
21
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
22
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
23
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
24
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@keadex/c4-model-ui-kit
|
|
28
|
+
MIT
|
|
29
|
+
|
|
30
|
+
@keadex/keadex-mina
|
|
31
|
+
MIT
|
|
32
|
+
MIT License
|
|
33
|
+
|
|
34
|
+
Copyright (c) 2024 Giacomo Simmi
|
|
35
|
+
|
|
36
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
37
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
38
|
+
in the Software without restriction, including without limitation the rights
|
|
39
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
40
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
41
|
+
furnished to do so, subject to the following conditions:
|
|
42
|
+
|
|
43
|
+
The above copyright notice and this permission notice shall be included in all
|
|
44
|
+
copies or substantial portions of the Software.
|
|
45
|
+
|
|
46
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
47
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
48
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
49
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
50
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
51
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
52
|
+
SOFTWARE.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@keadex/keadex-ui-kit
|
|
56
|
+
MIT
|
|
57
|
+
|
|
58
|
+
@keadex/keadex-utils
|
|
59
|
+
MIT
|
|
60
|
+
|
|
61
|
+
@keadex/mina-live
|
|
62
|
+
MIT
|
|
63
|
+
|
|
64
|
+
mina-live
|
|
65
|
+
MIT
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/README.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/keadex/keadex/main/libs/mina-live/static/mina-live-logo.svg" width="400" alt="Keadex Mina Live Logo" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<div align="center">
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
[](https://www.npmjs.com/package/@keadex/mina-live)
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Quick Overview
|
|
14
|
+
|
|
15
|
+
**Keadex Mina Live** is the web-based version of [Keadex Mina](https://keadex.dev/en/projects/keadex-mina).
|
|
16
|
+
|
|
17
|
+
Specifically, this library provides a React component that allows you to embed Keadex Mina into your [React](#usage-with-react) or [Next.js](#usage-with-nextjs) application.
|
|
18
|
+
|
|
19
|
+
<div align="center" style="margin-top: 20px">
|
|
20
|
+
<img src="https://raw.githubusercontent.com/keadex/keadex/refs/heads/main/apps/keadex-mina/public/mina-plantuml.png" alt="Keadex Mina Live" width="70%" />
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
## Usage with React
|
|
24
|
+
|
|
25
|
+
For a working example, please visit [this folder](https://github.com/keadex/keadex/tree/main/examples/mina-live-cra-example).
|
|
26
|
+
|
|
27
|
+
### Install
|
|
28
|
+
|
|
29
|
+
```shell
|
|
30
|
+
yarn add @keadex/mina-live # or npm install @keadex/mina-live
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Import
|
|
34
|
+
|
|
35
|
+
> [!WARNING]
|
|
36
|
+
> Make sure to include also the css file from `@keadex/mina-live/index.css`
|
|
37
|
+
|
|
38
|
+
`App.jsx`
|
|
39
|
+
|
|
40
|
+
```JSX
|
|
41
|
+
import "@keadex/mina-live/index.css";
|
|
42
|
+
import MinaLive from "@keadex/mina-live";
|
|
43
|
+
|
|
44
|
+
export function App() {
|
|
45
|
+
return (
|
|
46
|
+
<div className="w-full h-screen">
|
|
47
|
+
<MinaLive />
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export default App;
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Configure the bundler
|
|
56
|
+
|
|
57
|
+
Mina Live requires custom bundler configurations, such as enabling support for WebAssembly (WASM) files.
|
|
58
|
+
|
|
59
|
+
To simplify this setup, the Mina Live package provides a Webpack helper function (`withMinaLiveWebpackConfig()`) that streamlines the required configuration.
|
|
60
|
+
|
|
61
|
+
`webpack.config.js`
|
|
62
|
+
|
|
63
|
+
```JS
|
|
64
|
+
const { withMinaLiveWebpackConfig } = require("@keadex/mina-live/webpack-config");
|
|
65
|
+
|
|
66
|
+
const config = {
|
|
67
|
+
// your Webpack config
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
module.exports = withMinaLiveWebpackConfig()(config)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Usage with Next.js
|
|
74
|
+
|
|
75
|
+
For a working example, please visit [this folder](https://github.com/keadex/keadex/tree/main/examples/mina-live-nextjs-example).
|
|
76
|
+
|
|
77
|
+
### Install
|
|
78
|
+
|
|
79
|
+
```shell
|
|
80
|
+
yarn add @keadex/mina-live # or npm install @keadex/mina-live
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Create the Mina Live Client Component
|
|
84
|
+
|
|
85
|
+
> [!WARNING]
|
|
86
|
+
> Make sure to include also the css file from `@keadex/mina-live/index.css`
|
|
87
|
+
|
|
88
|
+
`src\components\MinaLiveClient\MinaLiveClient.tsx`
|
|
89
|
+
|
|
90
|
+
```TSX
|
|
91
|
+
'use client'
|
|
92
|
+
|
|
93
|
+
import dynamic from 'next/dynamic'
|
|
94
|
+
import '@keadex/mina-live/index.css'
|
|
95
|
+
|
|
96
|
+
const MinaLive = dynamic(() => import('@keadex/mina-live'), {
|
|
97
|
+
ssr: false,
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
export default function MinaLiveClient() {
|
|
101
|
+
return <MinaLive />
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Create the Mina Live Page
|
|
107
|
+
|
|
108
|
+
> [!WARNING]
|
|
109
|
+
> For Mina Live to function correctly, it must be served from a route that ends with `/mina-live` (e.g., `https://keadex.dev/mina-live`).
|
|
110
|
+
|
|
111
|
+
`src\app\mina-live\page.tsx`
|
|
112
|
+
|
|
113
|
+
```TSX
|
|
114
|
+
import MinaLiveClient from "@/components/MinaLiveClient/MinaLiveClient";
|
|
115
|
+
|
|
116
|
+
export default function MinaLive() {
|
|
117
|
+
return <MinaLiveClient />;
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Configure the bundler
|
|
122
|
+
|
|
123
|
+
Mina Live requires custom bundler configurations, such as enabling support for WebAssembly (WASM) files.
|
|
124
|
+
|
|
125
|
+
To simplify this setup, the Mina Live package provides a Next.js plugin (`withMinaLive()`) that streamlines the required configuration.
|
|
126
|
+
|
|
127
|
+
`next.config.ts`
|
|
128
|
+
|
|
129
|
+
```TS
|
|
130
|
+
import type { NextConfig } from "next";
|
|
131
|
+
|
|
132
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
133
|
+
const withMinaLive = require("@keadex/mina-live/nextjs-plugin");
|
|
134
|
+
|
|
135
|
+
const nextConfig: NextConfig = {
|
|
136
|
+
/* config options here */
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export default withMinaLive()(nextConfig);
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Configure the Next.js Middleware
|
|
143
|
+
|
|
144
|
+
To enable Mina Live to load all required assets, you need to configure the Next.js middleware by including the middleware provided by the Mina Live package.
|
|
145
|
+
|
|
146
|
+
`src\middleware.ts`
|
|
147
|
+
|
|
148
|
+
```TS
|
|
149
|
+
import { NextResponse, NextRequest } from "next/server";
|
|
150
|
+
import { minaMiddleware } from "@keadex/mina-live/nextjs-middleware";
|
|
151
|
+
|
|
152
|
+
export const config = {
|
|
153
|
+
matcher: ["/((?!api|_next/static|_next/image|assets|favicon.ico|sw.js).*)"],
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export function middleware(req: NextRequest) {
|
|
157
|
+
const minaMiddlewareResponse = minaMiddleware(req);
|
|
158
|
+
if (minaMiddlewareResponse) {
|
|
159
|
+
return minaMiddlewareResponse;
|
|
160
|
+
} else {
|
|
161
|
+
return NextResponse.next();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
```
|
|
Binary file
|