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

    Class HeaderAxis

    HeaderAxis — 헤더 제6축. 상속으로 SPI 를, 합성으로 등록 정책을 얻는다.

      IAppearanceAxis  (5 공통 SPI)
    implements
    TokenAxis (기존 글자도 고쳤다)
    extends ← ① 불변식은 상속으로. 형제 축과 리스코프 치환 가능
    HeaderAxis
    has-a ← ② 등록 정책은 합성으로. is-a 아니다

    TypedRegistry<HeaderPresetMeta> (v1.4.0 공개 확장점)

    extends TokenAxis 인가(상속을 쓰는 자리). assertNamespace · resolve 의 never-throw 폴백 · default → 빈 델타(byte-identical) · attr 생략 규칙 — 이 넷은 여섯 축이 똑같아야 하는 불변식이다. 베끼면 여섯 벌이 갈라진다. 상속이 정확한 도구다.

    TypedRegistry 를 상속하지 않고 안에 두는가(합성을 쓰는 자리). TypedRegistry<V>키→값 저장소HeaderAxis이다. is-a 가 아니다. 그리고 TokenAxis 를 고쳐 저장소를 갈아끼우면 기존 5축의 코드 경로가 바뀐다 — 「기본값 불변」 금지선에 직접 닿는다. 합성이면 헤더 축만 새 정책을 갖고 나머지 다섯은 한 바이트도 안 변한다(개방-폐쇄 원칙).

    이 축이 형제 축보다 더 갖는 것 — 기존 축들은 생 Map 이라 아래가 전부 없다: 내장 보호(protect-builtin) · 출처(origin) · 플러그인 수명(disposePlugin) · SPI 버전 검증 · og:* 예약 대역 보호 · never-throw 등록 결과. 그래서 이 축에서는 사용자가 define('rule', …) 해도 내장 프리셋이 조용히 사라지지 않는다.

    HeaderAxis — the 6th (header) axis: SPI conformance by inheritance, registration policy by composition. TokenAxis supplies the six-axis invariants; a composed TypedRegistry supplies built-in protection, origin tracking, plugin lifecycle and SPI checks that the sibling axes lack. Composition (not inheritance) is used because a registry is not a kind of axis, and because swapping TokenAxis's store would change the code path of the five existing axes.

    headerRegistry.resolve('rule');    // { tokens:{'--og-header-rule-width':'2px',…}, attr:{name:'data-og-header',value:'rule'} }
    headerRegistry.resolve('default'); // { tokens:{} } — 속성 미부착, byte-identical
    headerRegistry.define('rule', {}); // kept — 내장 보호. registration.ok === false

    Hierarchy

    • TokenAxis
      • HeaderAxis
    Index

    Constructors

    • Returns HeaderAxis

    Properties

    id: AxisId
    namespace: ReadonlySet<string>

    이 축이 소유하는 토큰 이름공간(검증용). / Token namespace this axis owns (for validation).

    Methods

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

      TokenAxis.define 과 달리 조용히 안 덮는다. 내장 5종(default·rule·quiet·band·pill)은 origin:'builtin' 으로 등록돼 있어 { override: true } 없이는 교체되지 않고, 거부 사유가 registration 으로 돌아온다(never-throw).

      축 오염(색·조판 토큰)은 상속받은 검사가 throw 한다 — 정책보다 먼저 걸린다. 순서가 중요하다: 오염된 델타는 애초에 등록 후보가 아니므로 정책 판정까지 갈 이유가 없다.

      Registers a user-defined preset. Unlike TokenAxis.define, built-ins are not silently replaced: without { override: true } the registration is rejected and the reason is returned in registration (never throws). Axis pollution throws first, before policy runs.

      Parameters

      • id: string

        프리셋 id / Preset id

      • delta: TokenDelta

        헤더 형태 토큰 델타 / Header shape-token delta

      • opts: RegisterOptions & { meta?: HeaderPresetMeta } = {}

        등록 정책 옵션(+ 프리셋 메타) / Registration policy options (plus preset meta)

      Returns AxisDefineResult & { registration: RegisterResult }

      클램프 반영 델타 + 경고 + 등록 판정 / Clamped delta, warnings, and the registration verdict

      색·조판 등 이름공간 밖 토큰이 있으면 Error / Throws on out-of-namespace tokens

    • 한 플러그인이 넣은 프리셋만 골라 해제한다 — 등록의 대칭.

      형제 축들에는 이 대칭이 없다(생 Map 이라 누가 넣었는지 모른다). 해제 건수를 반환한다.

      Disposes only the presets registered by one plugin — the symmetric counterpart to registration, which the sibling axes lack. Returns the number of entries removed.

      Parameters

      • pluginId: string

        해제할 플러그인 id / The plugin id to dispose

      Returns number

      해제된 건수 / Number of entries removed

    • 등록 기록(출처·플러그인·우선순위·SPI 버전). 진단·카탈로그용.

      Registration records (origin, plugin, priority, SPI version) — for diagnostics and catalogs.

      Returns readonly RegistryEntry<HeaderPresetMeta>[]

    • 등록 여부. / Whether registered.

      Parameters

      • id: string

      Returns boolean

    • 등록된 값 id 목록(카탈로그·인스펙터용). / Registered value ids (for catalog/inspector).

      Returns string[]

    • 등록 게이트에 축 오염 검사를 선행시킨다(assertTypographyOnly 와 동형 배선).

      Parameters

      Returns void

    • 축값 → 해소(토큰·속성·relayout 플래그). 미등록/default → 빈 델타. / Value id → resolution; unknown/default → empty delta.

      Parameters

      • valueId: string

      Returns AxisResolution