@nospt/plugin-dev-ai-hub 1.2.0-rc3 → 1.2.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/README.md +0 -7
- package/config.schema.json +0 -5
- package/dist/components/RecommendedBadge/RecommendedBadgeIcon.esm.js +4 -10
- package/dist/components/RecommendedBadge/RecommendedBadgeIcon.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/RecommendedBadge/recommended-badge.svg +0 -9
package/README.md
CHANGED
|
@@ -110,13 +110,6 @@ devAiHub:
|
|
|
110
110
|
# an overlay, so this never reflows the page; it is capped at the viewport
|
|
111
111
|
# width and floored at a sane minimum. Defaults to 615 when unset.
|
|
112
112
|
detailPanelWidth: 615
|
|
113
|
-
# Optional. Image for the "Recommended" mark — the badge on resource cards,
|
|
114
|
-
# the browse page's Recommended section heading, and the Admin Panel
|
|
115
|
-
# curation list. Any browser-loadable source — an absolute URL, an
|
|
116
|
-
# app-served static path, or a data URI. Defaults to the bundled
|
|
117
|
-
# medal-and-ribbon mark when unset. The heading's text stays amber to
|
|
118
|
-
# match that default, so pick an image that sits well beside it.
|
|
119
|
-
recommendedBadgeIcon: https://example.com/recommended.svg
|
|
120
113
|
# Optional. Default sort applied to the browse page on load, before any
|
|
121
114
|
# explicit user selection: `usage`, `newest`, or `name`. Users can still
|
|
122
115
|
# change it from the page's sort dropdown. Defaults to `usage` when unset.
|
package/config.schema.json
CHANGED
|
@@ -13,11 +13,6 @@
|
|
|
13
13
|
"description": "Width of the resource detail drawer, in pixels. The drawer is an overlay, so this never reflows the page; it is capped at the viewport width and floored at a sane minimum. Defaults to 615 when unset.",
|
|
14
14
|
"visibility": "frontend"
|
|
15
15
|
},
|
|
16
|
-
"recommendedBadgeIcon": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "Image used for the \"Recommended\" mark — the badge on resource cards, the browse page's Recommended section heading, and the Admin Panel curation list. Any browser-loadable source works — an absolute URL, an app-served static path, or a data URI. Defaults to the bundled medal-and-ribbon mark when unset.",
|
|
19
|
-
"visibility": "frontend"
|
|
20
|
-
},
|
|
21
16
|
"defaultSort": {
|
|
22
17
|
"type": "string",
|
|
23
18
|
"description": "Default sort applied to the browse page on load, before any explicit user selection (issue #102): `usage` (installs plus a weighted view count — the \"most popular\" composite), `newest` (when the plugin first saw the resource, ADR-0021), or `name`. Users can still change the sort from the page's sort dropdown; this only controls the initial order. An unrecognised value — including the removed `installs`, `downloads`, `views` and `recommended` modes — is rejected with a logged error and the page falls back to `usage`. Defaults to `usage` when unset.",
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useApi, configApiRef } from '@backstage/core-plugin-api';
|
|
3
|
-
import defaultRecommendedBadgeUrl from './recommended-badge.svg';
|
|
4
2
|
|
|
5
3
|
function RecommendedBadgeIcon({
|
|
6
4
|
size = 14,
|
|
7
5
|
className
|
|
8
6
|
}) {
|
|
9
|
-
const config = useApi(configApiRef);
|
|
10
|
-
const src = config.getOptionalString("devAiHub.ui.recommendedBadgeIcon") ?? defaultRecommendedBadgeUrl;
|
|
11
7
|
return /* @__PURE__ */ jsx(
|
|
12
|
-
"
|
|
8
|
+
"span",
|
|
13
9
|
{
|
|
14
|
-
src,
|
|
15
|
-
width: size,
|
|
16
|
-
height: size,
|
|
17
10
|
className,
|
|
18
|
-
|
|
19
|
-
"aria-hidden": "true"
|
|
11
|
+
style: { fontSize: size, lineHeight: 1 },
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
children: "\u2B50"
|
|
20
14
|
}
|
|
21
15
|
);
|
|
22
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendedBadgeIcon.esm.js","sources":["../../../src/components/RecommendedBadge/RecommendedBadgeIcon.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"RecommendedBadgeIcon.esm.js","sources":["../../../src/components/RecommendedBadge/RecommendedBadgeIcon.tsx"],"sourcesContent":["export interface RecommendedBadgeIconProps {\n size?: number;\n className?: string;\n}\n\n/**\n * The \"Recommended\" mark (#68, ADR-0017): a star emoji.\n *\n * Decorative — the text beside it (\"Recommended\") carries the meaning, so it\n * is hidden from assistive tech. `size` is the font size in pixels.\n */\nexport function RecommendedBadgeIcon({\n size = 14,\n className,\n}: RecommendedBadgeIconProps) {\n return (\n <span\n className={className}\n style={{ fontSize: size, lineHeight: 1 }}\n aria-hidden=\"true\"\n >\n ⭐\n </span>\n );\n}\n"],"names":[],"mappings":";;AAWO,SAAS,oBAAA,CAAqB;AAAA,EACnC,IAAA,GAAO,EAAA;AAAA,EACP;AACF,CAAA,EAA8B;AAC5B,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,KAAA,EAAO,EAAE,QAAA,EAAU,IAAA,EAAM,YAAY,CAAA,EAAE;AAAA,MACvC,aAAA,EAAY,MAAA;AAAA,MACb,QAAA,EAAA;AAAA;AAAA,GAED;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nospt/plugin-dev-ai-hub",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Frontend plugin for Dev AI Hub",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.esm.js",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@backstage/plugin-catalog-react": "^3.2.2",
|
|
67
67
|
"@backstage/plugin-permission-react": "^0.5.4",
|
|
68
68
|
"@backstage/ui": "^0.18.0",
|
|
69
|
-
"@nospt/plugin-dev-ai-hub-common": "^1.2.
|
|
69
|
+
"@nospt/plugin-dev-ai-hub-common": "^1.2.1",
|
|
70
70
|
"@remixicon/react": "^4.9.0",
|
|
71
71
|
"react-markdown": "^9.0.0",
|
|
72
72
|
"react-syntax-highlighter": "^16.1.1",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" role="img" aria-label="Recommended">
|
|
2
|
-
<!-- Ribbon tails, behind the medal -->
|
|
3
|
-
<path d="M8.6 13.5H11V21L9.8 18.5L8.6 21V13.5Z" fill="#92400E" fill-opacity="0.55" />
|
|
4
|
-
<path d="M13 13.5H15.4V21L14.2 18.5L13 21V13.5Z" fill="#92400E" fill-opacity="0.55" />
|
|
5
|
-
<!-- Medal — a 12-point rosette -->
|
|
6
|
-
<polygon points="12.00,1.80 13.45,3.59 15.60,2.76 15.96,5.04 18.24,5.40 17.41,7.55 19.20,9.00 17.41,10.45 18.24,12.60 15.96,12.96 15.60,15.24 13.45,14.41 12.00,16.20 10.55,14.41 8.40,15.24 8.04,12.96 5.76,12.60 6.59,10.45 4.80,9.00 6.59,7.55 5.76,5.40 8.04,5.04 8.40,2.76 10.55,3.59" fill="#92400E" />
|
|
7
|
-
<!-- Inner star -->
|
|
8
|
-
<polygon points="12.00,5.60 12.82,7.87 15.23,7.95 13.33,9.43 14.00,11.75 12.00,10.40 10.00,11.75 10.67,9.43 8.77,7.95 11.18,7.87" fill="#FFFFFF" />
|
|
9
|
-
</svg>
|