@proton-app/renderer 0.0.1
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/dist/index.d.ts +2 -0
- package/dist/index.js +18 -0
- package/dist/mount.d.ts +1 -0
- package/dist/mount.js +9 -0
- package/dist/router.d.ts +9 -0
- package/dist/router.js +7 -0
- package/package.json +35 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./mount"), exports);
|
|
18
|
+
__exportStar(require("./router"), exports);
|
package/dist/mount.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function mountApp(app: React.ReactNode): void;
|
package/dist/mount.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mountApp = mountApp;
|
|
4
|
+
const client_1 = require("react-dom/client");
|
|
5
|
+
function mountApp(app) {
|
|
6
|
+
const element = document.getElementById("root");
|
|
7
|
+
const root = (0, client_1.createRoot)(element);
|
|
8
|
+
root.render(app);
|
|
9
|
+
}
|
package/dist/router.d.ts
ADDED
package/dist/router.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppRouter = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_router_dom_1 = require("react-router-dom");
|
|
6
|
+
const AppRouter = ({ config }) => ((0, jsx_runtime_1.jsx)(react_router_dom_1.HashRouter, { children: (0, jsx_runtime_1.jsx)(react_router_dom_1.Routes, { children: Object.entries(config).map(([name, { layout, routes }]) => ((0, jsx_runtime_1.jsx)(react_router_dom_1.Route, { element: layout, children: routes.map(y => y()) }, name))) }) }));
|
|
7
|
+
exports.AppRouter = AppRouter;
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@proton-app/renderer",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"main": "./dist/index.js",
|
|
5
|
+
"types": "./dist/index.d.ts",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"author": "",
|
|
14
|
+
"description": "",
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"react": "^19.1.1",
|
|
17
|
+
"react-router-dom": "^7.12.0"
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./dist/index.js",
|
|
21
|
+
"./styles.css": "./dist/styles.css"
|
|
22
|
+
},
|
|
23
|
+
"engines": {},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "^24.3.1",
|
|
29
|
+
"@types/react": "^19.1.10",
|
|
30
|
+
"@types/react-dom": "^19.2.3",
|
|
31
|
+
"react": "^19.1.1",
|
|
32
|
+
"react-router-dom": "^7.12.0",
|
|
33
|
+
"typescript": "^5.9.2"
|
|
34
|
+
}
|
|
35
|
+
}
|