@devframes/hub-ui 0.9.8 → 0.9.10

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.mts CHANGED
@@ -4,11 +4,11 @@ import { DevframeHubUi } from "@devframes/hub/initiate";
4
4
  * Published `createUi()` config types, kept framework-free so the node
5
5
  * entry's declaration rollup (`dist/index.d.mts`) never pulls in Vue's type
6
6
  * surface. Client modules that need these types import them *from* here
7
- * (never the reverse) — see `client/state/branding.ts`,
7
+ * (never the reverse); see `client/state/branding.ts`,
8
8
  * `client/embedded/visibility.ts`.
9
9
  */
10
10
  /**
11
- * A logo asset — a single URL/data-URI, or per-color-scheme variants. The dark
11
+ * A logo asset: a single URL/data-URI, or per-color-scheme variants. The dark
12
12
  * variant falls back to the light one when only `light` is given (or a bare
13
13
  * string is used for both).
14
14
  */
@@ -33,13 +33,13 @@ type ViewerBackground = ColorSchemeValue | {
33
33
  * Consumer-facing branding for the reference hub-ui. Every field is optional
34
34
  * and falls back to devframe's own identity. Published as
35
35
  * `ConnectionMeta.configs.ui.branding` via `createUi({ branding })`, and
36
- * read from the one connection handshake the dock already performs —
36
+ * read from the one connection handshake the dock already performs;
37
37
  * `ConnectionMeta` has its own cross-realm propagation (see
38
38
  * `DEVFRAME_CONNECTION_KEY`), so branding needs no globals or query params
39
39
  * of its own.
40
40
  */
41
41
  interface DevframeBranding {
42
- /** Product name — the wordmark, window titles, and all user-visible copy. */
42
+ /** Product name: the wordmark, window titles, and all user-visible copy. */
43
43
  productName?: string;
44
44
  /** Logo mark (URL / data-URI), rendered via `<img>`. */
45
45
  logo?: BrandingLogo;
@@ -51,7 +51,7 @@ interface DevframeBranding {
51
51
  background?: ViewerBackground;
52
52
  /** Short line for the auth screen and the standalone meta description. */
53
53
  tagline?: string;
54
- /** Favicon URL — applied on the standalone viewer and the popped-out window only. */
54
+ /** Favicon URL, applied on the standalone viewer and the popped-out window only. */
55
55
  favicon?: string;
56
56
  /** Window/tab title; defaults to `productName`. */
57
57
  windowTitle?: string;
@@ -62,19 +62,19 @@ interface DevframeBranding {
62
62
  * `ConnectionMeta.configs.ui.dockPreferences`. Read by the embedded dock and
63
63
  * the standalone viewer at boot.
64
64
  *
65
- * Like the float/edge dock mode, these seed user-overridable state — the
65
+ * Like the float/edge dock mode, these seed user-overridable state; the
66
66
  * config sets the default, the visitor's own choice wins from then on.
67
67
  */
68
68
  interface DevframeDockPreferences {
69
69
  /**
70
- * The top-level dock-bar **category** ordering — a map of category id →
70
+ * The top-level dock-bar **category** ordering: a map of category id →
71
71
  * ordering weight (lower sorts earlier), merged beneath
72
72
  * `DEFAULT_CATEGORIES_ORDER`.
73
73
  */
74
74
  categoryOrder?: Record<string, number>;
75
75
  /**
76
76
  * Preferred inline-item capacity for the floating dock bar before entries
77
- * overflow. Edge mode ignores it — it shows every entry with no cutoff.
77
+ * overflow. Edge mode ignores it; it shows every entry with no cutoff.
78
78
  */
79
79
  maxVisibleItems?: number;
80
80
  /** Seeds a first-run visitor's dock mode (float vs edge). */
@@ -83,19 +83,19 @@ interface DevframeDockPreferences {
83
83
  defaultPosition?: 'left' | 'right' | 'top' | 'bottom';
84
84
  }
85
85
  /**
86
- * How the embedded floating dock reveals itself on a fresh page — the
86
+ * How the embedded floating dock reveals itself on a fresh page: the
87
87
  * reference UI's port of Nuxt DevTools' opt-in overlay, published as
88
88
  * `ConnectionMeta.configs.ui.embeddedVisibility` and set via
89
89
  * `createUi({ embeddedVisibility })`.
90
90
  *
91
- * - `normal` (default) — the dock is shown immediately.
92
- * - `passive` — the dock starts hidden and a console hint offers the reveal
91
+ * - `normal` (default): the dock is shown immediately.
92
+ * - `passive`: the dock starts hidden and a console hint offers the reveal
93
93
  * shortcut; revealing persists per-origin, so later sessions on this
94
94
  * browser start shown. The "Hide" command returns to passive.
95
- * - `hidden` — the dock starts hidden and the shortcut reveals it for the
95
+ * - `hidden`: the dock starts hidden and the shortcut reveals it for the
96
96
  * current session only; nothing is persisted.
97
97
  *
98
- * Whatever the policy, the reveal state is a user-overridable preference —
98
+ * Whatever the policy, the reveal state is a user-overridable preference,
99
99
  * the same shape as the float/edge dock mode: the config seeds it, the
100
100
  * visitor's own reveal/hide wins from then on.
101
101
  */
@@ -117,7 +117,7 @@ interface CreateUiOptions {
117
117
  /** Serve the floating-dock bootstrap at `<base>embedded.js`. Default: `true`. */
118
118
  embedded?: boolean;
119
119
  /**
120
- * Rebrand the reference UI — logo, product name, primary color, and more.
120
+ * Rebrand the reference UI: logo, product name, primary color, and more.
121
121
  * Published as `ConnectionMeta.configs.ui.branding`, read by the dock at
122
122
  * boot from the one connection handshake it already performs. Reaches
123
123
  * both the embedded dock and the standalone viewer.
@@ -126,20 +126,20 @@ interface CreateUiOptions {
126
126
  /**
127
127
  * How the embedded floating dock reveals itself on a fresh page:
128
128
  *
129
- * - `'normal'` (default) — shown immediately.
130
- * - `'passive'` — starts hidden with a console hint; `Shift+Alt+D` reveals
129
+ * - `'normal'` (default): shown immediately.
130
+ * - `'passive'`: starts hidden with a console hint; `Shift+Alt+D` reveals
131
131
  * it, and the reveal persists per-origin so later sessions start shown.
132
- * - `'hidden'` — starts hidden; `Shift+Alt+D` reveals it for the current
132
+ * - `'hidden'`: starts hidden; `Shift+Alt+D` reveals it for the current
133
133
  * session only.
134
134
  *
135
135
  * Published as `ConnectionMeta.configs.ui.embeddedVisibility`. Like the
136
- * float/edge dock mode, it seeds a user-overridable preference — the
136
+ * float/edge dock mode, it seeds a user-overridable preference; the
137
137
  * visitor's own reveal/hide wins from then on. Applies to the embedded
138
138
  * dock only; the standalone viewer is an explicit visit and always shows.
139
139
  */
140
140
  embeddedVisibility?: EmbeddedVisibility;
141
141
  /**
142
- * Dock-bar rendering preferences — category ordering, floating-dock
142
+ * Dock-bar rendering preferences: category ordering, floating-dock
143
143
  * inline-item capacity, and the first-run float/edge mode and position.
144
144
  * Published as `ConnectionMeta.configs.ui.dockPreferences`; each seeds a
145
145
  * user-overridable preference the visitor's own choice then wins.
@@ -147,7 +147,7 @@ interface CreateUiOptions {
147
147
  dockPreferences?: DevframeDockPreferences;
148
148
  }
149
149
  /**
150
- * The reference implementation of the hub's {@link DevframeHubUi} slot —
150
+ * The reference implementation of the hub's {@link DevframeHubUi} slot,
151
151
  * prebuilt from this package's web components (the floating `DockEmbedded`
152
152
  * bootstrap and the standalone `DockStandalone` SPA), styled with the
153
153
  * shared devframe design system.
@@ -159,7 +159,7 @@ interface CreateUiOptions {
159
159
  * const hub = initHub({ devframes: [git, terminals], ui: createUi() })
160
160
  * ```
161
161
  *
162
- * The hub stays headless either way — this object is one implementation of
162
+ * The hub stays headless either way; this object is one implementation of
163
163
  * the slot; a hub UI provider (a product's or your own) supplies a different one to the
164
164
  * same option and reuses all the infrastructure.
165
165
  */
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import { fileURLToPath } from "node:url";
6
6
  * The built client assets live next to the built entry (`dist/index.mjs` →
7
7
  * `dist/client/`). When this module runs from source instead (tests and
8
8
  * playgrounds resolving the workspace alias), fall back to the package's
9
- * `dist/client/` — the assets are build artifacts either way.
9
+ * `dist/client/`; the assets are build artifacts either way.
10
10
  */
11
11
  function clientDir() {
12
12
  const here = fileURLToPath(new URL(".", import.meta.url));
@@ -15,7 +15,7 @@ function clientDir() {
15
15
  return join(here, "../dist/client");
16
16
  }
17
17
  /**
18
- * The reference implementation of the hub's {@link DevframeHubUi} slot —
18
+ * The reference implementation of the hub's {@link DevframeHubUi} slot,
19
19
  * prebuilt from this package's web components (the floating `DockEmbedded`
20
20
  * bootstrap and the standalone `DockStandalone` SPA), styled with the
21
21
  * shared devframe design system.
@@ -27,7 +27,7 @@ function clientDir() {
27
27
  * const hub = initHub({ devframes: [git, terminals], ui: createUi() })
28
28
  * ```
29
29
  *
30
- * The hub stays headless either way — this object is one implementation of
30
+ * The hub stays headless either way; this object is one implementation of
31
31
  * the slot; a hub UI provider (a product's or your own) supplies a different one to the
32
32
  * same option and reuses all the infrastructure.
33
33
  */
@@ -36,6 +36,11 @@ 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
+ /**
40
+ * Publish the reference UI's config through the generic `ctx.staticConfig`,
41
+ * which rides the connection handshake to every mounted frame and the
42
+ * standalone viewer as `ConnectionMeta.configs.ui`.
43
+ */
39
44
  setup(ctx) {
40
45
  ctx.staticConfig.ui = {
41
46
  branding: options.branding || {},
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devframes/hub-ui",
3
3
  "type": "module",
4
- "version": "0.9.8",
4
+ "version": "0.9.10",
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/hub": "0.9.8",
33
- "@devframes/json-render": "0.9.8",
34
- "devframe": "0.9.8"
32
+ "@devframes/hub": "0.9.10",
33
+ "@devframes/json-render": "0.9.10",
34
+ "devframe": "0.9.10"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "@devframes/json-render": {
@@ -40,9 +40,9 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@antfu/design": "^0.4.0",
43
- "@devframes/hub": "0.9.8",
44
- "@devframes/json-render": "0.9.8",
45
- "@devframes/plugin-git": "0.9.8",
43
+ "@devframes/hub": "0.9.10",
44
+ "@devframes/json-render": "0.9.10",
45
+ "@devframes/plugin-git": "0.9.10",
46
46
  "@iconify-json/ph": "^1.2.2",
47
47
  "@storybook/addon-docs": "^10.5.10",
48
48
  "@storybook/vue3-vite": "^10.5.10",
@@ -50,7 +50,7 @@
50
50
  "@unocss/reset": "^66.8.1",
51
51
  "@vitejs/plugin-vue": "^6.0.8",
52
52
  "@vueuse/core": "^14.4.0",
53
- "devframe": "0.9.8",
53
+ "devframe": "0.9.10",
54
54
  "dompurify": "^3.4.14",
55
55
  "fuse.js": "^7.5.0",
56
56
  "iframe-pane": "^1.1.0",