@devframes/hub-ui 0.9.0-beta.1 → 0.9.0-beta.3
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/client/embedded.js +3836 -3533
- package/dist/client/standalone/assets/DockStandalone-CYtMwr1f.js +3 -0
- package/dist/client/standalone/assets/branding-1d9zClAZ.js +6 -0
- package/dist/client/standalone/assets/client-CaZDLKXI.js +1 -0
- package/dist/client/standalone/assets/context-CdeVGSRb.js +1 -0
- package/dist/client/standalone/assets/index-GsUzOyW2.js +4 -0
- package/dist/client/standalone/assets/{keybindings-CRo5AVOI.js → keybindings-Dl_4USpS.js} +4 -4
- package/dist/client/standalone/index.html +3 -4
- package/dist/index.d.mts +89 -10
- package/dist/index.mjs +7 -1
- package/package.json +9 -7
- package/dist/client/standalone/assets/DockStandalone-CFntZMZw.js +0 -1313
- package/dist/client/standalone/assets/branding-V4rxaera.js +0 -1
- package/dist/client/standalone/assets/client-BN8PboYb.js +0 -1
- package/dist/client/standalone/assets/color-mode-BPeeQXcs.js +0 -6
- package/dist/client/standalone/assets/context-Dg5cQHkz.js +0 -1
- package/dist/client/standalone/assets/index-BDzp-bCc.js +0 -3
- package/dist/client/standalone/assets/preload-helper-CyyvF4ac.js +0 -1
|
@@ -20,10 +20,9 @@
|
|
|
20
20
|
height: 100%;
|
|
21
21
|
}
|
|
22
22
|
</style>
|
|
23
|
-
<script type="module" crossorigin src="./assets/index-
|
|
24
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
25
|
-
<link rel="modulepreload" crossorigin href="./assets/client-
|
|
26
|
-
<link rel="modulepreload" crossorigin href="./assets/color-mode-BPeeQXcs.js">
|
|
23
|
+
<script type="module" crossorigin src="./assets/index-GsUzOyW2.js"></script>
|
|
24
|
+
<link rel="modulepreload" crossorigin href="./assets/branding-1d9zClAZ.js">
|
|
25
|
+
<link rel="modulepreload" crossorigin href="./assets/client-CaZDLKXI.js">
|
|
27
26
|
</head>
|
|
28
27
|
<body>
|
|
29
28
|
<div id="app"></div>
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,52 @@
|
|
|
1
1
|
import { DevframeHubUi } from "@devframes/hub/initiate";
|
|
2
|
+
//#region src/client/dock-preferences.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* The reference UI's dock-bar rendering preferences, set via
|
|
5
|
+
* `createUi({ dockPreferences })` and published as
|
|
6
|
+
* `ConnectionMeta.configs.ui.dockPreferences`. Read by the embedded dock and
|
|
7
|
+
* the standalone viewer at boot.
|
|
8
|
+
*
|
|
9
|
+
* Like the float/edge dock mode, these seed user-overridable state — the
|
|
10
|
+
* config sets the default, the visitor's own choice wins from then on.
|
|
11
|
+
*/
|
|
12
|
+
interface DevframeDockPreferences {
|
|
13
|
+
/**
|
|
14
|
+
* The top-level dock-bar **category** ordering — a map of category id →
|
|
15
|
+
* ordering weight (lower sorts earlier), merged beneath
|
|
16
|
+
* `DEFAULT_CATEGORIES_ORDER`.
|
|
17
|
+
*/
|
|
18
|
+
categoryOrder?: Record<string, number>;
|
|
19
|
+
/**
|
|
20
|
+
* Preferred inline-item capacity for the floating dock bar before entries
|
|
21
|
+
* overflow. Edge mode ignores it — it shows every entry with no cutoff.
|
|
22
|
+
*/
|
|
23
|
+
maxVisibleItems?: number;
|
|
24
|
+
/** Seeds a first-run visitor's dock mode (float vs edge). */
|
|
25
|
+
defaultMode?: 'float' | 'edge';
|
|
26
|
+
/** Seeds a first-run visitor's dock position. */
|
|
27
|
+
defaultPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/client/embedded/visibility.d.ts
|
|
31
|
+
/**
|
|
32
|
+
* How the embedded floating dock reveals itself on a fresh page — the
|
|
33
|
+
* reference UI's port of Nuxt DevTools' opt-in overlay, published as
|
|
34
|
+
* `ConnectionMeta.configs.ui.embeddedVisibility` and set via
|
|
35
|
+
* `createUi({ embeddedVisibility })`.
|
|
36
|
+
*
|
|
37
|
+
* - `normal` (default) — the dock is shown immediately.
|
|
38
|
+
* - `passive` — the dock starts hidden and a console hint offers the reveal
|
|
39
|
+
* shortcut; revealing persists per-origin, so later sessions on this
|
|
40
|
+
* browser start shown. The "Hide" command returns to passive.
|
|
41
|
+
* - `hidden` — the dock starts hidden and the shortcut reveals it for the
|
|
42
|
+
* current session only; nothing is persisted.
|
|
43
|
+
*
|
|
44
|
+
* Whatever the policy, the reveal state is a user-overridable preference —
|
|
45
|
+
* the same shape as the float/edge dock mode: the config seeds it, the
|
|
46
|
+
* visitor's own reveal/hide wins from then on.
|
|
47
|
+
*/
|
|
48
|
+
type EmbeddedVisibility = 'normal' | 'passive' | 'hidden';
|
|
49
|
+
//#endregion
|
|
2
50
|
//#region ../../node_modules/.pnpm/@vue+shared@3.5.41/node_modules/@vue/shared/dist/shared.d.ts
|
|
3
51
|
type Prettify<T> = { [K in keyof T]: T[K]; } & {};
|
|
4
52
|
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
|
|
@@ -21544,11 +21592,12 @@ type BrandingLogo = string | {
|
|
|
21544
21592
|
};
|
|
21545
21593
|
/**
|
|
21546
21594
|
* Consumer-facing branding for the reference hub-ui. Every field is optional
|
|
21547
|
-
* and falls back to devframe's own identity.
|
|
21548
|
-
*
|
|
21549
|
-
*
|
|
21550
|
-
* `
|
|
21551
|
-
*
|
|
21595
|
+
* and falls back to devframe's own identity. Published as
|
|
21596
|
+
* `ConnectionMeta.configs.ui.branding` via `createUi({ branding })`, and
|
|
21597
|
+
* read from the one connection handshake the dock already performs —
|
|
21598
|
+
* `ConnectionMeta` has its own cross-realm propagation (see
|
|
21599
|
+
* `DEVFRAME_CONNECTION_KEY`), so branding needs no globals or query params
|
|
21600
|
+
* of its own.
|
|
21552
21601
|
*/
|
|
21553
21602
|
interface DevframeBranding {
|
|
21554
21603
|
/** Product name — the wordmark, window titles, and all user-visible copy. */
|
|
@@ -21568,6 +21617,15 @@ interface DevframeBranding {
|
|
|
21568
21617
|
}
|
|
21569
21618
|
//#endregion
|
|
21570
21619
|
//#region src/index.d.ts
|
|
21620
|
+
declare module 'devframe/types' {
|
|
21621
|
+
interface DevframeConnectionConfigsRegistry {
|
|
21622
|
+
ui: {
|
|
21623
|
+
branding?: DevframeBranding;
|
|
21624
|
+
embeddedVisibility?: EmbeddedVisibility;
|
|
21625
|
+
dockPreferences?: DevframeDockPreferences;
|
|
21626
|
+
};
|
|
21627
|
+
}
|
|
21628
|
+
}
|
|
21571
21629
|
interface CreateUiOptions {
|
|
21572
21630
|
/** Serve the standalone viewer SPA at the hub base. Default: `true`. */
|
|
21573
21631
|
viewer?: boolean;
|
|
@@ -21575,12 +21633,33 @@ interface CreateUiOptions {
|
|
|
21575
21633
|
embedded?: boolean;
|
|
21576
21634
|
/**
|
|
21577
21635
|
* Rebrand the reference UI — logo, product name, primary color, and more.
|
|
21578
|
-
* Published as
|
|
21579
|
-
*
|
|
21580
|
-
*
|
|
21581
|
-
* `window.__DEVFRAME_BRANDING__` / `<script data-*>` / `?query` params.
|
|
21636
|
+
* Published as `ConnectionMeta.configs.ui.branding`, read by the dock at
|
|
21637
|
+
* boot from the one connection handshake it already performs. Reaches
|
|
21638
|
+
* both the embedded dock and the standalone viewer.
|
|
21582
21639
|
*/
|
|
21583
21640
|
branding?: DevframeBranding;
|
|
21641
|
+
/**
|
|
21642
|
+
* How the embedded floating dock reveals itself on a fresh page:
|
|
21643
|
+
*
|
|
21644
|
+
* - `'normal'` (default) — shown immediately.
|
|
21645
|
+
* - `'passive'` — starts hidden with a console hint; `Shift+Alt+D` reveals
|
|
21646
|
+
* it, and the reveal persists per-origin so later sessions start shown.
|
|
21647
|
+
* - `'hidden'` — starts hidden; `Shift+Alt+D` reveals it for the current
|
|
21648
|
+
* session only.
|
|
21649
|
+
*
|
|
21650
|
+
* Published as `ConnectionMeta.configs.ui.embeddedVisibility`. Like the
|
|
21651
|
+
* float/edge dock mode, it seeds a user-overridable preference — the
|
|
21652
|
+
* visitor's own reveal/hide wins from then on. Applies to the embedded
|
|
21653
|
+
* dock only; the standalone viewer is an explicit visit and always shows.
|
|
21654
|
+
*/
|
|
21655
|
+
embeddedVisibility?: EmbeddedVisibility;
|
|
21656
|
+
/**
|
|
21657
|
+
* Dock-bar rendering preferences — category ordering, floating-dock
|
|
21658
|
+
* inline-item capacity, and the first-run float/edge mode and position.
|
|
21659
|
+
* Published as `ConnectionMeta.configs.ui.dockPreferences`; each seeds a
|
|
21660
|
+
* user-overridable preference the visitor's own choice then wins.
|
|
21661
|
+
*/
|
|
21662
|
+
dockPreferences?: DevframeDockPreferences;
|
|
21584
21663
|
}
|
|
21585
21664
|
/**
|
|
21586
21665
|
* The reference implementation of the hub's {@link DevframeHubUi} slot —
|
|
@@ -21601,4 +21680,4 @@ interface CreateUiOptions {
|
|
|
21601
21680
|
*/
|
|
21602
21681
|
declare function createUi(options?: CreateUiOptions): DevframeHubUi;
|
|
21603
21682
|
//#endregion
|
|
21604
|
-
export { CreateUiOptions, type DevframeBranding, createUi };
|
|
21683
|
+
export { CreateUiOptions, type DevframeBranding, type DevframeDockPreferences, type EmbeddedVisibility, createUi };
|
package/dist/index.mjs
CHANGED
|
@@ -36,7 +36,13 @@ function createUi(options = {}) {
|
|
|
36
36
|
return {
|
|
37
37
|
...options.viewer !== false ? { viewer: { distDir: join(client, "standalone") } } : {},
|
|
38
38
|
...options.embedded !== false ? { embedded: { entry: join(client, "embedded.js") } } : {},
|
|
39
|
-
|
|
39
|
+
setup(ctx) {
|
|
40
|
+
ctx.staticConfig.ui = {
|
|
41
|
+
branding: options.branding || {},
|
|
42
|
+
...options.embeddedVisibility ? { embeddedVisibility: options.embeddedVisibility } : {},
|
|
43
|
+
...options.dockPreferences ? { dockPreferences: options.dockPreferences } : {}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
40
46
|
};
|
|
41
47
|
}
|
|
42
48
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devframes/hub-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.0-beta.
|
|
4
|
+
"version": "0.9.0-beta.3",
|
|
5
5
|
"description": "Reference UI for the devframe hub, providing the floating dock and standalone viewer.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@devframes/json-render": "0.9.0-beta.
|
|
33
|
-
"
|
|
34
|
-
"
|
|
32
|
+
"@devframes/json-render": "0.9.0-beta.3",
|
|
33
|
+
"devframe": "0.9.0-beta.3",
|
|
34
|
+
"@devframes/hub": "0.9.0-beta.3"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@antfu/design": "^0.3.4",
|
|
@@ -53,9 +53,10 @@
|
|
|
53
53
|
"unocss": "^66.7.5",
|
|
54
54
|
"vite": "^8.2.1",
|
|
55
55
|
"vue": "^3.5.41",
|
|
56
|
-
"
|
|
57
|
-
"@devframes/
|
|
58
|
-
"@devframes/
|
|
56
|
+
"@devframes/hub": "0.9.0-beta.3",
|
|
57
|
+
"@devframes/json-render": "0.9.0-beta.3",
|
|
58
|
+
"@devframes/plugin-git": "0.9.0-beta.3",
|
|
59
|
+
"devframe": "0.9.0-beta.3"
|
|
59
60
|
},
|
|
60
61
|
"scripts": {
|
|
61
62
|
"build": "pnpm run build:css && pnpm run build:node && pnpm run build:embedded && pnpm run build:standalone",
|
|
@@ -63,6 +64,7 @@
|
|
|
63
64
|
"build:node": "tsdown",
|
|
64
65
|
"build:embedded": "vite build --config vite.embedded.config.ts",
|
|
65
66
|
"build:standalone": "vite build --config src/client/standalone/vite.config.ts",
|
|
67
|
+
"dev": "pnpm -C ../.. exec turbo run build --filter=@devframes/hub... --filter=@devframes/plugin-git... && vite --config playground/vite.config.ts",
|
|
66
68
|
"typecheck": "tsc --noEmit",
|
|
67
69
|
"storybook": "storybook dev -p 6014",
|
|
68
70
|
"build-storybook": "storybook build"
|