openpencil/packages/pen-core/src
Fini dc73885015 feat(ai): add_otp_input_v0 — verification code input (65th tool)
Fills the auth-flow gap: 2FA / PIN / phone-verification codes.
Horizontal row of N square slots (4..8), one digit per slot.
Renders three states per caller intent:

  - blank (no `digits`): all slots empty, `focused_index` marks
    the currently-typing slot with an accent-color 2px outline
  - partial: first M slots filled with digit text, slot M+1
    focused, rest empty
  - full: all N slots filled (final submittable state)

Filled slots get role=otp-slot-filled + slate-700 border + 20/600
digit text. Focused empty slot gets role=otp-slot-focused +
2px accent border. Blank unfocused slots get role=otp-slot +
1px slate-300 border.

Wired through all standard points — schema into ext-2 (shorter
shard) + shim + SERVER_BUILDERS + parity CASES + contract
allow-list + elements.md decision tree + triggers + minimal
usage for each state.

Handler test covers 8 cases: registration + defaults (6 blank
focused-first) + partial state / full state / length clamp low
(< 4 → 4) + length clamp high (> 8 → 8) + accent color override
+ bogus parent_id rejection.
2026-04-22 21:48:05 +08:00
..
__tests__ feat(pen-core): buildModalShellV1 — first theme-aware v1 element (proof of chain) 2026-04-22 10:50:00 +08:00
element-builders feat(ai): add_otp_input_v0 — verification code input (65th tool) 2026-04-22 21:48:05 +08:00
layout fix(canvas): require explicit role:'overlay' for layout-flow escape hatch 2026-04-16 21:07:40 +08:00
merge V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
normalize V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
variables feat(pen-core): 14-variable semantic palette (unblocks v1 theme-aware tools) 2026-04-22 10:40:00 +08:00
arc-path.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
boolean-ops.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
constants.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
design-md-parser.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
font-utils.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
id.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
index.ts feat(ai): add_otp_input_v0 — verification code input (65th tool) 2026-04-22 21:48:05 +08:00
node-helpers.ts fix(types): re-export isBadgeOverlayNode as deprecated alias 2026-04-16 21:09:56 +08:00
normalize.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
path-anchors.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
sync-lock.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
tree-utils.ts V0.7.0 (#95) 2026-04-11 23:25:13 +08:00