OPEN_GRID API - v1.5.2
    Preparing search index...

    Function defineHeader

    • 사용자 정의 프리셋 등록.

      색·조판·밀도·질감 토큰이 섞여 있으면 등록 게이트가 즉시 throw 한다(축 오염 금지). 특히 --og-header-bg 처럼 접두사가 같아 헤더 것처럼 보이는 색 토큰도 거부한다 — 그것은 테마 축 소유다. 불투명도는 0~1 로, 음수 길이는 0 으로 클램프하고 경고한다.

      Register a user-defined preset.

      The registration gate throws on color/typography/density/texture tokens — including --og-header-* color tokens, which merely share the prefix but belong to the theme axis.

      내장 5종은 조용히 안 덮인다. { override: true } 없이 'rule' 을 다시 등록하면 거부되고 사유가 registration 으로 돌아온다(throw 하지 않는다). 형제 축(밀도·질감·타이포)에는 이 보호가 없어 내장값이 소리 없이 사라진다 — 헤더 축이 처음으로 갖는 안전장치다.

      Built-ins are protected: re-registering 'rule' without { override: true } is rejected and the reason comes back in registration — it never throws. The sibling axes lack this protection.

      Parameters

      • id: string

        프리셋 id

        Preset id

      • delta: TokenDelta

        헤더 형태 토큰 델타

        Header shape-token delta

      • Optionalopts: RegisterOptions & { meta?: HeaderPresetMeta }

        등록 정책 옵션(override·pluginId·priority) + 프리셋 메타

        Registration policy options plus preset metadata

      Returns AxisDefineResult & { registration: RegisterResult }

      클램프 반영된 델타 + 경고 + 등록 판정

      The clamped delta, warnings, and the registration verdict

      defineHeader('hairline', { '--og-header-rule-width': '1px', '--og-header-hint-opacity': '0.3' });

      // 내장 보호 — 덮으려면 명시해야 한다
      defineHeader('rule', d).registration.ok; // false (kept)
      defineHeader('rule', d, { override: true }).registration.ok; // true (replaced)

      // 플러그인이 넣은 것만 골라 해제 — 등록의 대칭
      defineHeader('mine', d, { pluginId: 'acme' });
      headerRegistry.disposePlugin('acme'); // 1