docs: add nodedc ui guideline registry

This commit is contained in:
DCCONSTRUCTIONS
2026-05-01 22:28:34 +03:00
parent 85aa322990
commit c99c91c826
26 changed files with 1209 additions and 0 deletions
@@ -0,0 +1,40 @@
{
"id": "media-source-field",
"name": "MediaSourceField",
"kind": "component",
"status": "draft-stable",
"summary": "Media input field that switches between local storage upload and external URL for card and background content.",
"sourceRefs": [
{
"project": "nodedc_launcher",
"file": "src/widgets/admin-overlay/AdminOverlay.tsx",
"functions": ["MediaSourceField", "MediaPreview"]
},
{
"project": "nodedc_launcher",
"file": "src/styles/globals.css",
"classes": ["service-media-control", "service-media-file-button", "service-media-source-button"]
}
],
"anatomy": [
"label with icon",
"rounded input/control shell",
"file chooser button",
"selected filename",
"URL input",
"two circular source buttons: file, url",
"preview surface"
],
"behaviorContract": [
"Local file upload persists to public storage and returns stable URL.",
"Source switch decides whether field uses stored file URL or external URL.",
"Accepts images, gifs, videos, and common video extensions.",
"Preview renders video when mediaKind or extension indicates video."
],
"rules": [
"The file chooser is a single rounded button, never browser default file input UI.",
"The source buttons are circular and attached to the field right side.",
"Background content and card content both accept the same media categories."
]
}