@devframes/hub-ui 0.9.0-beta.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/LICENSE.md +21 -0
- package/dist/client/embedded.js +15418 -0
- package/dist/client/standalone/assets/DockStandalone-CFntZMZw.js +1313 -0
- package/dist/client/standalone/assets/branding-V4rxaera.js +1 -0
- package/dist/client/standalone/assets/client-BN8PboYb.js +1 -0
- package/dist/client/standalone/assets/color-mode-BPeeQXcs.js +6 -0
- package/dist/client/standalone/assets/context-Dg5cQHkz.js +1 -0
- package/dist/client/standalone/assets/index-BDzp-bCc.js +3 -0
- package/dist/client/standalone/assets/keybindings-CRo5AVOI.js +4 -0
- package/dist/client/standalone/assets/preload-helper-CyyvF4ac.js +1 -0
- package/dist/client/standalone/index.html +31 -0
- package/dist/index.d.mts +21604 -0
- package/dist/index.mjs +43 -0
- package/package.json +70 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
//#region src/index.ts
|
|
5
|
+
/**
|
|
6
|
+
* The built client assets live next to the built entry (`dist/index.mjs` →
|
|
7
|
+
* `dist/client/`). When this module runs from source instead (tests and
|
|
8
|
+
* playgrounds resolving the workspace alias), fall back to the package's
|
|
9
|
+
* `dist/client/` — the assets are build artifacts either way.
|
|
10
|
+
*/
|
|
11
|
+
function clientDir() {
|
|
12
|
+
const here = fileURLToPath(new URL(".", import.meta.url));
|
|
13
|
+
const sibling = join(here, "client");
|
|
14
|
+
if (existsSync(join(sibling, "embedded.js"))) return sibling;
|
|
15
|
+
return join(here, "../dist/client");
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The reference implementation of the hub's {@link DevframeHubUi} slot —
|
|
19
|
+
* prebuilt from this package's web components (the floating `DockEmbedded`
|
|
20
|
+
* bootstrap and the standalone `DockStandalone` viewer), styled with the
|
|
21
|
+
* shared devframe design system.
|
|
22
|
+
*
|
|
23
|
+
* ```ts
|
|
24
|
+
* import { initHub } from '@devframes/hub/initiate'
|
|
25
|
+
* import { createUi } from '@devframes/hub-ui'
|
|
26
|
+
*
|
|
27
|
+
* const hub = initHub({ devframes: [git, terminals], ui: createUi() })
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* The hub stays headless either way — this object is one implementation of
|
|
31
|
+
* the slot; a viewer product (or your own) supplies a different one to the
|
|
32
|
+
* same option and reuses all the infrastructure.
|
|
33
|
+
*/
|
|
34
|
+
function createUi(options = {}) {
|
|
35
|
+
const client = clientDir();
|
|
36
|
+
return {
|
|
37
|
+
...options.viewer !== false ? { viewer: { distDir: join(client, "standalone") } } : {},
|
|
38
|
+
...options.embedded !== false ? { embedded: { entry: join(client, "embedded.js") } } : {},
|
|
39
|
+
...options.branding ? { assets: { "branding.json": () => JSON.stringify(options.branding) } } : {}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { createUi };
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@devframes/hub-ui",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.9.0-beta.1",
|
|
5
|
+
"description": "Reference UI for the devframe hub, providing the floating dock and standalone viewer.",
|
|
6
|
+
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"homepage": "https://github.com/devframes/devframe#readme",
|
|
9
|
+
"repository": {
|
|
10
|
+
"directory": "packages/hub-ui",
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/devframes/devframe.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": "https://github.com/devframes/devframe/issues",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"devtools",
|
|
17
|
+
"devframe",
|
|
18
|
+
"hub",
|
|
19
|
+
"dock",
|
|
20
|
+
"ui"
|
|
21
|
+
],
|
|
22
|
+
"sideEffects": false,
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./dist/index.mjs",
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"types": "./dist/index.d.mts",
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@devframes/json-render": "0.9.0-beta.1",
|
|
33
|
+
"@devframes/hub": "0.9.0-beta.1",
|
|
34
|
+
"devframe": "0.9.0-beta.1"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@antfu/design": "^0.3.4",
|
|
38
|
+
"@iconify-json/ph": "^1.2.2",
|
|
39
|
+
"@storybook/addon-docs": "^10.5.7",
|
|
40
|
+
"@storybook/vue3-vite": "^10.5.7",
|
|
41
|
+
"@types/node": "^26.2.0",
|
|
42
|
+
"@unocss/reset": "^66.7.5",
|
|
43
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
44
|
+
"@vueuse/core": "^14.4.0",
|
|
45
|
+
"dompurify": "^3.4.13",
|
|
46
|
+
"fuse.js": "^7.5.0",
|
|
47
|
+
"iframe-pane": "^1.1.0",
|
|
48
|
+
"magic-string": "^1.1.1",
|
|
49
|
+
"storybook": "^10.5.7",
|
|
50
|
+
"tinyglobby": "^0.2.17",
|
|
51
|
+
"tsdown": "^0.22.14",
|
|
52
|
+
"tsx": "^4.23.12",
|
|
53
|
+
"unocss": "^66.7.5",
|
|
54
|
+
"vite": "^8.2.1",
|
|
55
|
+
"vue": "^3.5.41",
|
|
56
|
+
"devframe": "0.9.0-beta.1",
|
|
57
|
+
"@devframes/hub": "0.9.0-beta.1",
|
|
58
|
+
"@devframes/json-render": "0.9.0-beta.1"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "pnpm run build:css && pnpm run build:node && pnpm run build:embedded && pnpm run build:standalone",
|
|
62
|
+
"build:css": "tsx scripts/build-css.ts",
|
|
63
|
+
"build:node": "tsdown",
|
|
64
|
+
"build:embedded": "vite build --config vite.embedded.config.ts",
|
|
65
|
+
"build:standalone": "vite build --config src/client/standalone/vite.config.ts",
|
|
66
|
+
"typecheck": "tsc --noEmit",
|
|
67
|
+
"storybook": "storybook dev -p 6014",
|
|
68
|
+
"build-storybook": "storybook build"
|
|
69
|
+
}
|
|
70
|
+
}
|