0.4.2
0.4.2 のリリースノート。
Released: 2026-06-30
機能
OKLCH color tab — the reserved
colortab now honorsformat: 'oklch'. A cluster-based color tab whose palette tier items declaretype: { kind: 'color', format: 'oklch' }now edits its palette swatches through the lossless OKLCHColorField(thevalueFormat: 'oklch'picker added in 0.3.3) while keeping the full color-cluster feature set — base roles, semantic→palette mappings, the "Scheme…" preset dropdown, and the secondary cluster. The paletteformatis read fromtab.tiers(the flattened cluster drops per-item format), and both the primary and secondary cluster palettes honor it. Absent /'hex'format keeps the existing native hex behavior, so existing consumers and the highlight popover are unchanged. (#436, epic #434, supersedes #433) (ab761b6)Owner-only autoload. A new
${storagePrefix}:autoloadlocalStorageflag lets the site owner load the panel in their own browser without touching general visitors. When the flag is set, the panel bundle loads eagerly on every page visit and mounts CLOSED — the Alt+click element-path inspector is armed immediately even while the panel UI stays hidden. General visitors (no flag) receive zero panel JS.New package-root exports:
enableAutoload(),disableAutoload(),shouldAutoload(). The Astro host-adapter also installswindow[consoleNamespace].enableAutoload()andwindow[consoleNamespace].disableAutoload()on the console API surface.The existing on-demand flow (
showDesignPanel()/hideDesignPanel()/toggleDesignPanel()) is unchanged. Owner-autoload is an opt-in layer on top of it, not a replacement.Auto-remember: any action that opens the panel also writes
${storagePrefix}:autoload = '1'. Once an owner opens the panel, subsequent page loads reload it automatically without another explicitenableAutoload()call.Lazy-load gate updated from 2 to 4 signals: the host-adapter gate now fires on
wasVisible() || hasPersistedOverrides() || shouldAutoload() || loadElementPathEnabled(). The last two signals are new; the previous two-signal behavior is a strict subset of the new gate, so existing consumers see no change.
バグ修正
Runtime preserves OKLCH through seed / apply / persist.
initColorFromSchemeDatano longer eagerly normalizes the whole palette to sRGB hex via a canvasfillStyleround-trip — rawoklch(...)palette values now survive seeding (wide-gamut chroma intact; no collapse to#000000under jsdom / engines whose 2D canvas can't parseoklch), andcolorRefToIndexis format-tolerant + alpha-aware. Non-oklchentries are still sanitized throughcssColorToHex, so an invalid bundled-scheme string (e.g.Default Dark's slot-9"18", referenced bybackground: 9) cannot leak into a CSS custom property. (#435) (162bf8e, 8d54e07)Owner-autoload review fixes —
disableAutoload()now unmounts the panel, and element-path storage keys are per-instance. (#424) (ecfd745)
その他の変更
Panel is draggable, movable & resizable on narrow windows;
defaultSize()is clamped to theMIN_PANELfloor on phone-width viewports; and Element-Path-Copy keeps working while the panel is closed. (#415) (2dc40a1, 8fb99b5, f163625)Wave-2 OKLCH cluster end-to-end test plus runtime / color-tab coverage. (#437) (8da36c6, 47e4d83, fad4ded)
Bump the
@takazudo/*toolchain (zfb next.72, zudo-doc 2.1.2). (d711839)Doc-site migration to zudo-doc v2 — doc-site only, no package impact. (#432)