Prompt utilisé pour régénérer cette page :
Page: Zahl Character Map — Unicode Numerological Reference
Category: sandbox (sub-page of /sandbox/zahl/)
Description: "Unicode character reference with numerological values"
No icon, no tags, no status in front matter. Parent section: Zahl (numerological text analysis).
Front matter (index.md):
---
title: "Character map"
description: "Unicode character reference with numerological values"
---
Directory structure:
- index.md — page content (HTML structure)
- default.js — character map page controller
- default.scss — page styles
- _navigation.left.md — left sidebar navigation widget
HTML structure (index.md body):
- header.map-header:
- a#btn-collapse (href="#", title="Collapse all rows") — "Collapse all" link
- a#btn-expand (href="#", title="Expand all rows") — "Expand all" link
- section#bloc-map — empty container, dynamically populated with collapsible character groups
=== _navigation.left.md (widget) ===
Front matter: title="Navigation", weight=10
Content: Two nav sections with h5 headings:
- "Zahl" section: links to /sandbox/zahl/ ("Evaluate") and /sandbox/zahl/history/ ("Browse history")
- "Information" section: link to /sandbox/zahl/map/ ("Character map", class="focus")
=== default.js (character map page controller) ===
Imports: { charmap } from '../_zahl.lib.js' (named export — sparse array from parent directory)
The charmap is a sparse array defined in the parent _zahl.lib.js module. It maps Unicode code points (array indices) to numerological component arrays [level0, level1, level2] where each value is 0-9.
Helper function:
- _kbd(c): generates HTML for a <kbd> element. Format: <kbd id="char-{c}" title="Dec:{c} Hex:{hex}"> &#entity; </kbd>. Control characters (code point <= 0x21) are mapped to Unicode Control Pictures block (U+2400 + c) for display. Others use direct HTML entity &#c;.
Event handlers:
- #btn-collapse click: sets all <details> elements to .open = false.
- #btn-expand click: sets all <details> elements to .open = true.
Rendering algorithm:
1. Gets #bloc-map container.
2. Creates _kbd_group object to group characters by numerological ID.
3. Iterates charmap.forEach((v, k)): v = [level0, level1, level2], k = code point.
4. Computes group ID string by concatenating 3 components (e.g. "100", "010", "001", "523").
5. Creates <details> element per group if new:
- Default: open = false
- Auto-open rules (groups with only one non-zero component):
- If v[0]=0 AND v[1]=0: opens, class "level-2"
- If v[0]=0 AND v[2]=0: opens, class "level-1"
- If v[1]=0 AND v[2]=0: opens, class "level-0"
- Contains <summary> with group ID text
- Contains div.content container for kbd elements
6. Appends _kbd(k) HTML to group's content div.
7. Sorts groups numerically by ID string, appends all to #bloc-map.
=== default.scss ===
.map-header: flex, center aligned, gap var(--layout-spacing), margin-bottom spacing.
details: 4px padding, transparent bg, muted text color, user-select none. kbd children: transition 200ms.
details:hover: surface bg. kbd children: primary text, secondary bg.
details > summary: 2px margin-bottom/padding, no outline, pointer cursor, 1.1em font.
details > .content: left margin spacing, quarter-spacing padding.
Links: main a[href]:hover = primary color.
Navigation: nav a[href].focus = primary color.
Page entièrement générée et maintenue par IA, sans intervention humaine.