{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A picture in a fixed ratio that follows the theme. `src` is the picture of the light theme, `darkSrc` the one of the dark theme (without it the dark theme shows `src`). Without both (an empty string counts as none) it shows the built-in neutral placeholders (base64 data URIs, one",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n    Source: packages/compose-gen/specs/patterns/media-frame.json\n    A picture in a fixed ratio that follows the theme. `src` is the picture of the light theme, `darkSrc` the one of the dark theme (without it the dark theme shows `src`). Without both (an empty string counts as none) it shows the built-in neutral placeholders (base64 data URIs, one light and one dark), so a page can be laid out before it has pictures; the placeholder is decorative (`alt` is empty), stands in for a real `src` and is switched by the theme token. A real picture gets `alt` and loads lazily. `ratio` comes from the recipe; the corners are the plain theme radius.\n    Props (p): alt, src, darkSrc, ratio, className. -#}\n{%- set k_PLACEHOLDER = {'light': 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgMzAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCBzbGljZSI+PHJlY3Qgd2lkdGg9IjQwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiNlMmU4ZjAiLz48Y2lyY2xlIGN4PSIyOTYiIGN5PSI5NiIgcj0iMzAiIGZpbGw9IiNjYmQ1ZTEiLz48cGF0aCBkPSJNMCAzMDBWMjE0bDk2LTc2IDg4IDcwIDY0LTQ4IDE1MiA5NnY0NHoiIGZpbGw9IiNjYmQ1ZTEiLz48cGF0aCBkPSJNMCAzMDB2LTUybDEyMC02MCAxMTAgNjIgNjAtMzAgMTEwIDgwdjB6IiBmaWxsPSIjOTRhM2I4IiBvcGFjaXR5PSIwLjU1Ii8+PC9zdmc+', 'dark': 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgMzAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCBzbGljZSI+PHJlY3Qgd2lkdGg9IjQwMCIgaGVpZ2h0PSIzMDAiIGZpbGw9IiMxZTI5M2IiLz48Y2lyY2xlIGN4PSIyOTYiIGN5PSI5NiIgcj0iMzAiIGZpbGw9IiMzMzQxNTUiLz48cGF0aCBkPSJNMCAzMDBWMjE0bDk2LTc2IDg4IDcwIDY0LTQ4IDE1MiA5NnY0NHoiIGZpbGw9IiMzMzQxNTUiLz48cGF0aCBkPSJNMCAzMDB2LTUybDEyMC02MCAxMTAgNjIgNjAtMzAgMTEwIDgwdjB6IiBmaWxsPSIjNDc1NTY5IiBvcGFjaXR5PSIwLjU1Ii8+PC9zdmc+'} -%}\n{%- set v_alt = og_def(p['alt'], none) -%}\n{%- set v_src = og_def(p['src'], none) -%}\n{%- set v_darkSrc = og_def(p['darkSrc'], none) -%}\n{%- set v_ratio = og_def(p['ratio'], '16/9') -%}\n{%- set v_lightSrc = (v_src if og_t(v_src) else og_at(k_PLACEHOLDER, 'light')) -%}\n{%- set v_nightSrc = (v_darkSrc if og_t(v_darkSrc) else (v_src if og_t(v_src) else og_at(k_PLACEHOLDER, 'dark'))) -%}\n{%- set v_shownAlt = (v_alt if og_t(v_src) else '') -%}\n{%- set v_loadHint = ('lazy' if og_t(v_src) else none) -%}\n{%- set v_decodeHint = ('async' if og_t(v_src) else none) -%}\n{%- set c_1 -%}\n  {{ og_include('compose/image.html.j2', {'p': {'Src': og_url(og_s(v_lightSrc), true), 'Alt': og_s(v_shownAlt), 'Loading': og_s(v_loadHint), 'Decoding': og_s(v_decodeHint), 'Class': 'absolute inset-0 size-full object-cover dark:hidden', 'Attrs': og_attrs(['data-theme-src', 'light'])}}) }}\n  {{ og_include('compose/image.html.j2', {'p': {'Src': og_url(og_s(v_nightSrc), true), 'Alt': og_s(v_shownAlt), 'Loading': og_s(v_loadHint), 'Decoding': og_s(v_decodeHint), 'Class': 'absolute inset-0 hidden size-full object-cover dark:block', 'Attrs': og_attrs(['data-theme-src', 'dark'])}}) }}\n{%- endset -%}\n{{ og_include('compose/box.html.j2', {'p': {'Class': og_s(og_cnv([og_recipe('blocks/recipes/media-frame.variants.json', {'ratio': v_ratio}), og_def(p['className'], '')])), 'Attrs': og_attrs(['data-slot', 'media-frame', 'data-placeholder', ('false' if og_t(v_src) else 'true')])}, 'children': c_1}) }}\n",
      "path": "blocks/media-frame.html.j2",
      "target": "blocks/media-frame.html.j2"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "jinja2",
      "component"
    ]
  },
  "name": "media-frame",
  "registryDependencies": [
    "box",
    "image",
    "presets",
    "utils"
  ],
  "runtime": "jinja2",
  "title": "Media Frame",
  "type": "registry:component"
}
