@dxos/plugin-template 0.4.8-main.beadd4b → 0.4.8-main.c1580f6
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/package.json +1 -1
- package/dist/src/composer/config.ts.t.d.ts.map +1 -0
- package/dist/src/composer/config.ts.t.js.map +1 -0
- package/dist/src/composer/main.tsx.t.d.ts.map +1 -0
- package/dist/src/composer/main.tsx.t.js.map +1 -0
- package/dist/src/composer/shell.html.t.d.ts.map +1 -0
- package/dist/src/composer/shell.html.t.js.map +1 -0
- package/dist/src/composer/shell.ts.t.d.ts.map +1 -0
- package/dist/src/composer/shell.ts.t.js.map +1 -0
- package/dist/src/composer/translations.d.ts.map +1 -0
- package/dist/src/composer/translations.js.map +1 -0
- package/dist/src/vite.config.ts.t.js +5 -5
- package/package.json +5 -5
- package/src/composer/config.ts.t.ts +11 -0
- package/src/composer/dx.yml +11 -0
- package/src/composer/index.html +50 -0
- package/src/composer/main.tsx.t.ts +105 -0
- package/src/composer/shell.html.t.ts +44 -0
- package/src/composer/shell.ts.t.ts +13 -0
- package/src/composer/translations.ts +28 -0
- package/src/vite.config.ts.t.ts +5 -5
- package/dist/src/dev/config.ts.t.d.ts.map +0 -1
- package/dist/src/dev/config.ts.t.js.map +0 -1
- package/dist/src/dev/main.tsx.t.d.ts.map +0 -1
- package/dist/src/dev/main.tsx.t.js.map +0 -1
- package/dist/src/dev/shell.html.t.d.ts.map +0 -1
- package/dist/src/dev/shell.html.t.js.map +0 -1
- package/dist/src/dev/shell.ts.t.d.ts.map +0 -1
- package/dist/src/dev/shell.ts.t.js.map +0 -1
- package/dist/src/dev/translations.d.ts.map +0 -1
- package/dist/src/dev/translations.js.map +0 -1
- /package/dist/src/{dev → composer}/config.ts.t.d.ts +0 -0
- /package/dist/src/{dev → composer}/config.ts.t.js +0 -0
- /package/dist/src/{dev → composer}/main.tsx.t.d.ts +0 -0
- /package/dist/src/{dev → composer}/main.tsx.t.js +0 -0
- /package/dist/src/{dev → composer}/shell.html.t.d.ts +0 -0
- /package/dist/src/{dev → composer}/shell.html.t.js +0 -0
- /package/dist/src/{dev → composer}/shell.ts.t.d.ts +0 -0
- /package/dist/src/{dev → composer}/shell.ts.t.js +0 -0
- /package/dist/src/{dev → composer}/translations.d.ts +0 -0
- /package/dist/src/{dev → composer}/translations.js +0 -0
package/dist/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.ts.t.d.ts","sourceRoot":"","sources":["../../../src/composer/config.ts.t.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAOG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.ts.t.js","sourceRoot":"","sources":["../../../src/composer/config.ts.t.ts"],"names":[],"mappings":";;;;;AAAA,uCAAoC;AACpC,+DAAqC;AAErC,kBAAe,oBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,CAAC,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAC;;;;;GAKnF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.tsx.t.d.ts","sourceRoot":"","sources":["../../../src/composer/main.tsx.t.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAqGG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.tsx.t.js","sourceRoot":"","sources":["../../../src/composer/main.tsx.t.ts"],"names":[],"mappings":";;;;;AAAA,+DAAqC;AACrC,uCAAoC;AAEpC,kBAAe,oBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,CAAC,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;;;;;MAW7D,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;;;;;;KAYxC;;;;;QAMG,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;;;WAUzC;;;;;;;;;;;;;;;;;;;;;;YAsBM,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;;;;;;;;;;WAgBxC;;;;;;YAMC,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;;;WASxC;;;;;;;GAOR;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.html.t.d.ts","sourceRoot":"","sources":["../../../src/composer/shell.html.t.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAGA,wBAwCG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.html.t.js","sourceRoot":"","sources":["../../../src/composer/shell.html.t.ts"],"names":[],"mappings":";;;;;AAAA,uCAAoC;AACpC,+DAAqC;AAErC,kBAAe,oBAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,CAAC,cAAc,IAAI,IAAA,aAAK,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsClE;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.ts.t.d.ts","sourceRoot":"","sources":["../../../src/composer/shell.ts.t.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBASE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell.ts.t.js","sourceRoot":"","sources":["../../../src/composer/shell.ts.t.ts"],"names":[],"mappings":";;;;;AAAA,uCAAoC;AACpC,+DAAqC;AAErC,kBAAe,oBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,CAAC,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;GAOlF;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/composer/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAIA,wBAuBE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translations.js","sourceRoot":"","sources":["../../../src/composer/translations.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,kBAAe;IACb;QACE,OAAO,EAAE;YACP,QAAQ,EAAE;gBACR,kBAAkB,EAAE,kBAAkB;gBACtC,mBAAmB,EAAE,8BAA8B;gBACnD,qBAAqB,EACnB,8HAA8H;gBAChI,oBAAoB,EAAE,iBAAiB;gBACvC,sBAAsB,EACpB,oHAAoH;gBACtH,sBAAsB,EAAE,sDAAsD;gBAC9E,kBAAkB,EAAE,iBAAiB;gBACrC,mBAAmB,EAAE,QAAQ;gBAC7B,8BAA8B,EAAE,QAAQ;gBACxC,oBAAoB,EAAE,OAAO;gBAC7B,4BAA4B,EAAE,8CAA8C;gBAC5E,+BAA+B,EAAE,yBAAyB;gBAC1D,iCAAiC,EAC/B,0OAA0O;aAC7O;SACF;KACF;CACF,CAAC"}
|
|
@@ -24,8 +24,8 @@ exports.default = template_t_1.default.define.script({
|
|
|
24
24
|
server: {
|
|
25
25
|
host: true,
|
|
26
26
|
},
|
|
27
|
-
root: '
|
|
28
|
-
build: { outDir: "
|
|
27
|
+
root: 'composer',
|
|
28
|
+
build: { outDir: "composer/out", target: "esnext" },
|
|
29
29
|
optimizeDeps: { esbuildOptions: { target: "esnext" } },
|
|
30
30
|
define: {
|
|
31
31
|
process: {
|
|
@@ -37,11 +37,11 @@ exports.default = template_t_1.default.define.script({
|
|
|
37
37
|
plugins: [
|
|
38
38
|
react(),
|
|
39
39
|
ThemePlugin({
|
|
40
|
-
root: __dirname + '/
|
|
40
|
+
root: __dirname + '/composer',
|
|
41
41
|
content: [
|
|
42
|
-
resolve(__dirname, "./
|
|
42
|
+
resolve(__dirname, "./composer/index.html"),
|
|
43
43
|
resolve(__dirname, "./src/**/*.{js,ts,jsx,tsx}"),
|
|
44
|
-
resolve(__dirname, "./
|
|
44
|
+
resolve(__dirname, "./composer/**/*.{js,ts,jsx,tsx}"),
|
|
45
45
|
${defaultPlugins && (0, plate_1.plate /* javascript */) `
|
|
46
46
|
resolve(__dirname, "node_modules/@dxos/react-ui/dist/**/*.mjs"),
|
|
47
47
|
resolve(__dirname, "node_modules/@dxos/react-ui-theme/dist/**/*.mjs"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-template",
|
|
3
|
-
"version": "0.4.8-main.
|
|
3
|
+
"version": "0.4.8-main.c1580f6",
|
|
4
4
|
"description": "An template project for prototyping plugins for the DXOS app framework.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dxos",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"chalk": "^4.1.0",
|
|
22
22
|
"lodash.merge": "^4.6.2",
|
|
23
23
|
"sanitize-filename": "1.6.3",
|
|
24
|
-
"@dxos/plate": "0.4.8-main.
|
|
24
|
+
"@dxos/plate": "0.4.8-main.c1580f6"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@phosphor-icons/react": "^2.0.5",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"ts-node": "10.9.1",
|
|
31
31
|
"types-package-json": "^2.0.39",
|
|
32
32
|
"typescript": "^5.2.2",
|
|
33
|
-
"@dxos/
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/
|
|
33
|
+
"@dxos/config": "0.4.8-main.c1580f6",
|
|
34
|
+
"@dxos/shell": "0.4.8-main.c1580f6",
|
|
35
|
+
"@dxos/app-framework": "0.4.8-main.c1580f6"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { plate } from '@dxos/plate';
|
|
2
|
+
import template from '../template.t';
|
|
3
|
+
|
|
4
|
+
export default template.define.script({
|
|
5
|
+
content: ({ input: { defaultPlugins } }) => defaultPlugins && plate/* javascript */ `
|
|
6
|
+
import { Config, Defaults, Envs, Local, Storage } from '@dxos/config';
|
|
7
|
+
export const createConfig = async () => {
|
|
8
|
+
return new Config(await Storage(), Envs(), Local(), Defaults());
|
|
9
|
+
};
|
|
10
|
+
`,
|
|
11
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" style="overscroll-behavior: none">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,interactive-widget=resizes-content" />
|
|
6
|
+
<title>Composer</title>
|
|
7
|
+
<meta name="description" content="DXOS Composer Application" />
|
|
8
|
+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
|
9
|
+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
|
10
|
+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
|
11
|
+
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#003E70" />
|
|
12
|
+
<meta name="msapplication-TileColor" content="#003E70" />
|
|
13
|
+
<meta name="theme-color" content="#003E70" />
|
|
14
|
+
<meta
|
|
15
|
+
http-equiv="Content-Security-Policy"
|
|
16
|
+
content="
|
|
17
|
+
connect-src https: file: ipc: socket: wss://*.dxos.org ws://localhost:* http://localhost:*;
|
|
18
|
+
script-src https: socket: http://localhost:* 'unsafe-eval' 'unsafe-inline';
|
|
19
|
+
frame-src https: socket: http://localhost:* composer:;
|
|
20
|
+
worker-src https: socket: http://localhost:*;
|
|
21
|
+
img-src https: data: file: http://localhost:*;
|
|
22
|
+
child-src 'none';
|
|
23
|
+
object-src 'none';
|
|
24
|
+
"
|
|
25
|
+
/>
|
|
26
|
+
<script>
|
|
27
|
+
function setTheme(darkMode) {
|
|
28
|
+
document.documentElement.classList[darkMode ? 'add' : 'remove']('dark');
|
|
29
|
+
}
|
|
30
|
+
setTheme(window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
31
|
+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function (event) {
|
|
32
|
+
setTheme(event.matches);
|
|
33
|
+
});
|
|
34
|
+
</script>
|
|
35
|
+
<style>
|
|
36
|
+
html {
|
|
37
|
+
font-size: 18px;
|
|
38
|
+
}
|
|
39
|
+
@media (min-width: 768px) {
|
|
40
|
+
html {
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
45
|
+
</head>
|
|
46
|
+
<body>
|
|
47
|
+
<div id="root"></div>
|
|
48
|
+
<script type="module" src="main.tsx"></script>
|
|
49
|
+
</body>
|
|
50
|
+
</html>
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import template from '../template.t';
|
|
2
|
+
import { plate } from '@dxos/plate';
|
|
3
|
+
|
|
4
|
+
export default template.define.script({
|
|
5
|
+
content: ({ input: { defaultPlugins } }) => plate/* javascript */`
|
|
6
|
+
import "@dxosTheme";
|
|
7
|
+
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { Status, ThemeProvider, Tooltip } from "@dxos/react-ui";
|
|
10
|
+
import { defaultTx } from "@dxos/react-ui-theme";
|
|
11
|
+
import { createApp, Plugin } from "@dxos/app-framework";
|
|
12
|
+
import { createRoot } from "react-dom/client";
|
|
13
|
+
import translations from "./translations";
|
|
14
|
+
|
|
15
|
+
import ThemeMeta from "@braneframe/plugin-theme/meta";
|
|
16
|
+
${defaultPlugins && plate/* javascript */`
|
|
17
|
+
import ClientMeta from "@braneframe/plugin-client/meta";
|
|
18
|
+
import GraphMeta from "@braneframe/plugin-graph/meta";
|
|
19
|
+
import LayoutMeta from "@braneframe/plugin-layout/meta";
|
|
20
|
+
import NavTreeMeta from "@braneframe/plugin-navtree/meta";
|
|
21
|
+
import SpaceMeta from "@braneframe/plugin-space/meta";
|
|
22
|
+
import StackMeta from "@braneframe/plugin-stack/meta";
|
|
23
|
+
import SettingsMeta from "@braneframe/plugin-settings/meta";
|
|
24
|
+
import MetadataMeta from "@braneframe/plugin-metadata/meta";
|
|
25
|
+
|
|
26
|
+
import { createClientServices } from "@dxos/react-client";
|
|
27
|
+
import { createConfig } from "./config";
|
|
28
|
+
`}
|
|
29
|
+
|
|
30
|
+
import { meta } from "../src/plugin";
|
|
31
|
+
|
|
32
|
+
(async function () {
|
|
33
|
+
${
|
|
34
|
+
defaultPlugins && plate/* javascript */`
|
|
35
|
+
const config = await createConfig();
|
|
36
|
+
const services = await createClientServices(
|
|
37
|
+
config,
|
|
38
|
+
// () =>
|
|
39
|
+
// new SharedWorker(new URL("@dxos/client/shared-worker", import.meta.url), {
|
|
40
|
+
// type: "module",
|
|
41
|
+
// name: "dxos-client-worker",
|
|
42
|
+
// })
|
|
43
|
+
);`
|
|
44
|
+
}
|
|
45
|
+
const App = createApp({
|
|
46
|
+
fallback: ({ error }) => (
|
|
47
|
+
<ThemeProvider tx={defaultTx} resourceExtensions={translations}>
|
|
48
|
+
<Tooltip.Provider>
|
|
49
|
+
<div className="flex bs-[100dvh] justify-center items-center p-6 text-red-500">
|
|
50
|
+
{error.message}
|
|
51
|
+
</div>
|
|
52
|
+
</Tooltip.Provider>
|
|
53
|
+
</ThemeProvider>
|
|
54
|
+
),
|
|
55
|
+
placeholder: (
|
|
56
|
+
<ThemeProvider tx={defaultTx}>
|
|
57
|
+
<div className="flex bs-[100dvh] justify-center items-center">
|
|
58
|
+
<Status indeterminate aria-label="Initializing" placeholder="" />
|
|
59
|
+
</div>
|
|
60
|
+
</ThemeProvider>
|
|
61
|
+
),
|
|
62
|
+
plugins: {
|
|
63
|
+
[ThemeMeta.id]: Plugin.lazy(() => import("@braneframe/plugin-theme"), {
|
|
64
|
+
appName: "Composer",
|
|
65
|
+
}),
|
|
66
|
+
${defaultPlugins && plate/* javascript */`
|
|
67
|
+
[LayoutMeta.id]: Plugin.lazy(() => import("@braneframe/plugin-layout")),
|
|
68
|
+
[NavTreeMeta.id]: Plugin.lazy(() => import("@braneframe/plugin-navTree")),
|
|
69
|
+
[SettingsMeta.id]: Plugin.lazy(() => import("@braneframe/plugin-settings")),
|
|
70
|
+
[ClientMeta.id]: Plugin.lazy(() => import("@braneframe/plugin-client"), {
|
|
71
|
+
appKey: "composer.local",
|
|
72
|
+
config,
|
|
73
|
+
services,
|
|
74
|
+
shell: "./shell.html",
|
|
75
|
+
}),
|
|
76
|
+
[SpaceMeta.id]: Plugin.lazy(() => import("@braneframe/plugin-space")),
|
|
77
|
+
[GraphMeta.id]: Plugin.lazy(() => import("@braneframe/plugin-graph")),
|
|
78
|
+
[MetadataMeta.id]: Plugin.lazy(
|
|
79
|
+
() => import("@braneframe/plugin-metadata")
|
|
80
|
+
),
|
|
81
|
+
[StackMeta.id]: Plugin.lazy(() => import("@braneframe/plugin-stack")),
|
|
82
|
+
`}
|
|
83
|
+
[meta.id]: Plugin.lazy(() => import("../src/plugin")),
|
|
84
|
+
},
|
|
85
|
+
order: [
|
|
86
|
+
// Outside of error boundary so error dialog is styled.
|
|
87
|
+
ThemeMeta,
|
|
88
|
+
${defaultPlugins && plate/* javascript */`
|
|
89
|
+
LayoutMeta,
|
|
90
|
+
NavTreeMeta,
|
|
91
|
+
SettingsMeta,
|
|
92
|
+
ClientMeta,
|
|
93
|
+
SpaceMeta,
|
|
94
|
+
GraphMeta,
|
|
95
|
+
MetadataMeta,
|
|
96
|
+
StackMeta,
|
|
97
|
+
`}
|
|
98
|
+
meta,
|
|
99
|
+
],
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
createRoot(document.getElementById("root")!).render(<App />);
|
|
103
|
+
})();
|
|
104
|
+
`
|
|
105
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { plate } from '@dxos/plate';
|
|
2
|
+
import template from '../template.t';
|
|
3
|
+
|
|
4
|
+
export default template.define.text({
|
|
5
|
+
content: ({ input: { defaultPlugins } }) => defaultPlugins && plate`
|
|
6
|
+
<!DOCTYPE html>
|
|
7
|
+
<html lang="en">
|
|
8
|
+
<head>
|
|
9
|
+
<meta charset="UTF-8" />
|
|
10
|
+
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
|
|
11
|
+
<meta
|
|
12
|
+
http-equiv="Content-Security-Policy"
|
|
13
|
+
content="
|
|
14
|
+
connect-src https: file: ipc: socket: ws://localhost:* http://localhost:*;
|
|
15
|
+
script-src https: socket: http://localhost:* 'unsafe-eval' 'unsafe-inline';
|
|
16
|
+
img-src https: data: file: http://localhost:*;
|
|
17
|
+
child-src 'none';
|
|
18
|
+
object-src 'none';
|
|
19
|
+
"
|
|
20
|
+
/>
|
|
21
|
+
<style>
|
|
22
|
+
html,
|
|
23
|
+
body {
|
|
24
|
+
background: transparent !important;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
27
|
+
<!-- TODO(wittjosiah): Add hash/nonce and remove unsafe-inline from content security policy. -->
|
|
28
|
+
<script>
|
|
29
|
+
function setTheme(darkMode) {
|
|
30
|
+
document.documentElement.classList[darkMode ? 'add' : 'remove']('dark');
|
|
31
|
+
}
|
|
32
|
+
setTheme(window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
33
|
+
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', function (e) {
|
|
34
|
+
setTheme(e.matches);
|
|
35
|
+
});
|
|
36
|
+
</script>
|
|
37
|
+
</head>
|
|
38
|
+
<body>
|
|
39
|
+
<div id="root"></div>
|
|
40
|
+
<script type="module" src="shell.ts"></script>
|
|
41
|
+
</body>
|
|
42
|
+
</html>
|
|
43
|
+
`
|
|
44
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { plate } from '@dxos/plate';
|
|
2
|
+
import template from '../template.t';
|
|
3
|
+
|
|
4
|
+
export default template.define.script({
|
|
5
|
+
content: ({ input: { defaultPlugins } }) => defaultPlugins && plate/* javascript */`
|
|
6
|
+
import '@dxosTheme';
|
|
7
|
+
import { runShell } from '@dxos/shell/react';
|
|
8
|
+
import { createConfig } from './config';
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line no-console
|
|
11
|
+
createConfig().then(runShell).catch(console.error);
|
|
12
|
+
`
|
|
13
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
'en-US': {
|
|
8
|
+
composer: {
|
|
9
|
+
'show stack label': 'View stack trace',
|
|
10
|
+
'fatal error title': 'The app encountered an error',
|
|
11
|
+
'fatal error message':
|
|
12
|
+
'Please refresh the page to continue. If you keep seeing this error, please create a GitHub issue or ask for help on Discord.',
|
|
13
|
+
'reset dialog label': 'Reload or reset',
|
|
14
|
+
'reset dialog message':
|
|
15
|
+
'If you’re encountering issues, reloading may fix the issue. If reloading doesn’t help, consider resetting the app.',
|
|
16
|
+
'caught error message': 'Something went wrong; check the console for details.',
|
|
17
|
+
'copy error label': 'Copy this error',
|
|
18
|
+
'reload page label': 'Reload',
|
|
19
|
+
'update and reload page label': 'Update',
|
|
20
|
+
'reset client label': 'Reset',
|
|
21
|
+
'reset client confirm label': 'Confirm to wipe ALL DATA from local database',
|
|
22
|
+
'INVALID_STORAGE_VERSION title': 'Invalid storage version',
|
|
23
|
+
'INVALID_STORAGE_VERSION message':
|
|
24
|
+
'The application is not compatible with the current storage version. The data must be migrated to the new protocol in order to be used with this application. The current version is {{actual}} and the expected version is {{expected}}.',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
];
|
package/src/vite.config.ts.t.ts
CHANGED
|
@@ -20,8 +20,8 @@ export default template.define.script({
|
|
|
20
20
|
server: {
|
|
21
21
|
host: true,
|
|
22
22
|
},
|
|
23
|
-
root: '
|
|
24
|
-
build: { outDir: "
|
|
23
|
+
root: 'composer',
|
|
24
|
+
build: { outDir: "composer/out", target: "esnext" },
|
|
25
25
|
optimizeDeps: { esbuildOptions: { target: "esnext" } },
|
|
26
26
|
define: {
|
|
27
27
|
process: {
|
|
@@ -33,11 +33,11 @@ export default template.define.script({
|
|
|
33
33
|
plugins: [
|
|
34
34
|
react(),
|
|
35
35
|
ThemePlugin({
|
|
36
|
-
root: __dirname + '/
|
|
36
|
+
root: __dirname + '/composer',
|
|
37
37
|
content: [
|
|
38
|
-
resolve(__dirname, "./
|
|
38
|
+
resolve(__dirname, "./composer/index.html"),
|
|
39
39
|
resolve(__dirname, "./src/**/*.{js,ts,jsx,tsx}"),
|
|
40
|
-
resolve(__dirname, "./
|
|
40
|
+
resolve(__dirname, "./composer/**/*.{js,ts,jsx,tsx}"),
|
|
41
41
|
${defaultPlugins && plate/* javascript */`
|
|
42
42
|
resolve(__dirname, "node_modules/@dxos/react-ui/dist/**/*.mjs"),
|
|
43
43
|
resolve(__dirname, "node_modules/@dxos/react-ui-theme/dist/**/*.mjs"),
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.ts.t.d.ts","sourceRoot":"","sources":["../../../src/dev/config.ts.t.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAOG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.ts.t.js","sourceRoot":"","sources":["../../../src/dev/config.ts.t.ts"],"names":[],"mappings":";;;;;AAAA,uCAAoC;AACpC,+DAAqC;AAErC,kBAAe,oBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,CAAC,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAC;;;;;GAKnF;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.tsx.t.d.ts","sourceRoot":"","sources":["../../../src/dev/main.tsx.t.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAqGG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.tsx.t.js","sourceRoot":"","sources":["../../../src/dev/main.tsx.t.ts"],"names":[],"mappings":";;;;;AAAA,+DAAqC;AACrC,uCAAoC;AAEpC,kBAAe,oBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,CAAC,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;;;;;MAW7D,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;;;;;;KAYxC;;;;;QAMG,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;;;WAUzC;;;;;;;;;;;;;;;;;;;;;;YAsBM,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;;;;;;;;;;WAgBxC;;;;;;YAMC,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;;;WASxC;;;;;;;GAOR;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shell.html.t.d.ts","sourceRoot":"","sources":["../../../src/dev/shell.html.t.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAGA,wBAwCG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shell.html.t.js","sourceRoot":"","sources":["../../../src/dev/shell.html.t.ts"],"names":[],"mappings":";;;;;AAAA,uCAAoC;AACpC,+DAAqC;AAErC,kBAAe,oBAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,CAAC,cAAc,IAAI,IAAA,aAAK,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsClE;CACF,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shell.ts.t.d.ts","sourceRoot":"","sources":["../../../src/dev/shell.ts.t.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBASE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shell.ts.t.js","sourceRoot":"","sources":["../../../src/dev/shell.ts.t.ts"],"names":[],"mappings":";;;;;AAAA,uCAAoC;AACpC,+DAAqC;AAErC,kBAAe,oBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,CAAC,cAAc,IAAI,IAAA,aAAK,CAAA,gBAAgB,EAAA;;;;;;;GAOlF;CACF,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/dev/translations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAIA,wBAuBE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"translations.js","sourceRoot":"","sources":["../../../src/dev/translations.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,0BAA0B;AAC1B,EAAE;;AAEF,kBAAe;IACb;QACE,OAAO,EAAE;YACP,QAAQ,EAAE;gBACR,kBAAkB,EAAE,kBAAkB;gBACtC,mBAAmB,EAAE,8BAA8B;gBACnD,qBAAqB,EACnB,8HAA8H;gBAChI,oBAAoB,EAAE,iBAAiB;gBACvC,sBAAsB,EACpB,oHAAoH;gBACtH,sBAAsB,EAAE,sDAAsD;gBAC9E,kBAAkB,EAAE,iBAAiB;gBACrC,mBAAmB,EAAE,QAAQ;gBAC7B,8BAA8B,EAAE,QAAQ;gBACxC,oBAAoB,EAAE,OAAO;gBAC7B,4BAA4B,EAAE,8CAA8C;gBAC5E,+BAA+B,EAAE,yBAAyB;gBAC1D,iCAAiC,EAC/B,0OAA0O;aAC7O;SACF;KACF;CACF,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|