You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/1.guide/2.devframe-definition.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ export default defineDevframe({
39
39
40
40
## Definition fields
41
41
42
-
`id`, `name`, `version`, `packageName`, `homepage`, `description`, and `setup` are required; pass `importMetaUrl: import.meta.url` so [remote assets](/guide/client-assets) and declared [services](/guide/services#wire-services) resolve against the devframe's own dependencies. The remaining fields cover display (`icon`), mounting (`basePath`, `duplicationStrategy`, `capabilities`), what the devframe consumes and serves (`services`, `clientAssets`, `rpc.snapshot`), and [CLI defaults](#cli-options) (`cli`). Every field is listed in the [Node-Side API reference](/references/node-api#definition-fields).
42
+
`id`, `name`, `version`, `packageName`, `homepage`, `description`, and `setup` are required; pass `importMetaUrl: import.meta.url` so [remote assets](/guide/client-assets) and declared [services](/guide/services#wire-services) resolve against the devframe's own dependencies. The remaining fields cover display (`icon`, [Icon values](/references/node-api#icon-values)), mounting (`basePath`, `duplicationStrategy`, `capabilities`), what the devframe consumes and serves (`services`, `clientAssets`, `rpc.snapshot`), and [CLI defaults](#cli-options) (`cli`). Every field is listed in the [Node-Side API reference](/references/node-api#definition-fields).
|`duplicationStrategy`|`'warn' \| 'silent' \| 'throw' \| 'duplicate'`| Hub reaction when another devframe shares this `id`. Default `'warn'`. See [Duplication strategies](/references/hub-api#duplication-strategies); standalone adapters ignore it. |
@@ -30,6 +30,20 @@ The fields of a `DevframeDefinition`: [Devframe Definition](/guide/devframe-defi
30
30
|`setup`|`(ctx, info?) => void \| Promise<void>`|**Required.** Server-side entry point, run in every runtime. Optional 2nd arg carries runtime metadata, notably parsed CLI `flags` under `createCac`. |
31
31
|`cli`|`DevframeCliOptions`| CLI adapter defaults. See [CLI options](#cli-options). |
32
32
33
+
## Icon values
34
+
35
+
The `icon` field, and every dock entry, command, and terminal icon, accept the same string forms. A `{ light, dark }` pair picks the matching variant per active color scheme, and each side takes any of these forms:
36
+
37
+
| Form | Example | Rendered as |
38
+
|---|---|---|
39
+
| Iconify name |`ph:gauge-duotone`, `logos:nuxt-icon`| the `collection:icon` glyph, fetched from Iconify as inline SVG |
40
+
| Image URL |`/icons/logo.svg`, `https://example.com/logo.png`| an `<img>`; relative URLs resolve against the supplying hub |
41
+
| Data URL |`data:image/svg+xml,%3Csvg…%3E`| an inline `<img>` from the embedded data |
42
+
| SVG mask |`mask:/icons/logo.svg`, `mask:data:image/svg+xml,%3Csvg…%3E`| an alpha mask tinted with `currentColor`, following the surrounding text color |
43
+
| Light/dark pair |`{ light: './logo-light.svg', dark: './logo-dark.svg' }`| the variant matching the active color scheme; each side is any string form above |
44
+
45
+
The reference hub UI and terminal SPA render `mask:` icons with the surrounding text color, preserving the image's shape and opacity, so a bundled monochrome SVG follows the dock's foreground color through selected and dimmed states. For a bundled SVG, use `` `mask:data:image/svg+xml,${encodeURIComponent(svg)}` ``. A mask produces one color; use an ordinary image URL for multicolor artwork. Relative mask URLs on dock entries resolve against the supplying hub's URL. Custom hub UI providers implement this string convention in their own icon renderer.
46
+
33
47
## CLI options
34
48
35
49
The `cli` field's `DevframeCliOptions`: [CLI options](/guide/devframe-definition#cli-options).
Copy file name to clipboardExpand all lines: docs/content/8.references/6.hub-api.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,7 +145,7 @@ The origin-locked `postMessage` protocol on `devframe:frame-nav`: [Shared-iframe
145
145
146
146
## Dock entry types
147
147
148
-
The built-in variants of the open dock union (`DevframeDockEntryRegistry`, `@devframes/hub/types`) a hub UI provider renders: [Build Your Own Hub UI](/guide/build-your-own-hub-ui).
148
+
The built-in variants of the open dock union (`DevframeDockEntryRegistry`, `@devframes/hub/types`) a hub UI provider renders: [Build Your Own Hub UI](/guide/build-your-own-hub-ui). Each entry's `icon` takes any of the [icon values](/references/node-api#icon-values).
0 commit comments