chore(embedded): cut v0.0.17-beta

This commit is contained in:
ZDDC 2026-05-09 21:51:08 -05:00
parent 53eb58b90b
commit 464c80c1e1
8 changed files with 20 additions and 278 deletions

View file

@ -2245,7 +2245,7 @@ td[data-field="trackingNumber"] {
</svg> </svg>
<div class="header-title-group"> <div class="header-title-group">
<span class="app-header__title">ZDDC Archive</span> <span class="app-header__title">ZDDC Archive</span>
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · lily-quilt-hazel</span></span> <span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
</div> </div>
<button id="addDirectoryBtn" class="btn btn-primary">Add Local Directory</button> <button id="addDirectoryBtn" class="btn btn-primary">Add Local Directory</button>
<button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh Data"></button> <button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh Data"></button>

View file

@ -791,58 +791,6 @@ body {
white-space: nowrap; white-space: nowrap;
} }
/* Auto-filter rows in <thead>. Two rows — one targets file rows
(📄 icon, with file-name + ext inputs), one targets folder rows
(📁 icon, with folder-name input). The icons make it visually
obvious which row controls which kind of filter. The rows are
non-sticky (only the sortable header row sticks) — keeps the
stack-positioning math out of the picture and accepts that
filters scroll out of view on long lists. */
.browse-table thead .filter-row th {
position: static;
padding: 0.25rem 0.6rem;
background: var(--bg-secondary);
border-bottom: 1px solid var(--border);
cursor: default;
font-weight: normal;
z-index: 0;
}
.browse-table thead .filter-row th:hover {
background: var(--bg-secondary);
}
.filter-row__icon {
display: inline-block;
width: 1.2rem;
text-align: center;
margin-right: 0.3rem;
vertical-align: middle;
font-size: 0.95rem;
color: var(--text-muted);
}
.column-filter {
width: calc(100% - 1.5rem);
padding: 0.2rem 0.4rem;
border: 1px solid var(--border);
border-radius: 3px;
background: var(--bg);
color: var(--text);
font-size: 0.8rem;
font-family: Consolas, Monaco, monospace;
box-sizing: border-box;
}
.filter-row th.col-name .column-filter {
width: calc(100% - 1.7rem); /* leave space for the icon */
}
.column-filter:focus {
outline: 1px solid var(--primary);
outline-offset: -1px;
}
/* Table — folders + files in a tree */ /* Table — folders + files in a tree */
.browse-table { .browse-table {
@ -999,7 +947,7 @@ body {
</svg> </svg>
<div class="header-title-group"> <div class="header-title-group">
<span class="app-header__title">ZDDC Browse</span> <span class="app-header__title">ZDDC Browse</span>
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · lily-quilt-hazel</span></span> <span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
</div> </div>
<button id="addDirectoryBtn" class="btn btn-primary">Add Local Directory</button> <button id="addDirectoryBtn" class="btn btn-primary">Add Local Directory</button>
<button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh listing" aria-label="Refresh listing"></button> <button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh listing" aria-label="Refresh listing"></button>
@ -1024,10 +972,7 @@ body {
</ul> </ul>
<p>Once loaded: click a folder to expand it, <b>shift-click</b> <p>Once loaded: click a folder to expand it, <b>shift-click</b>
to expand its entire subtree (or collapse it again), to expand its entire subtree (or collapse it again),
click column headers to sort. Use the 📄 row to filter files click column headers to sort. Click any file to open it.</p>
(and the 📁 row to scope to matching folders) — file matches
stay visible together with their containing folders.
Click any file to open it.</p>
</div> </div>
</div> </div>
@ -1045,32 +990,6 @@ body {
<th data-sort="ext" class="col-ext sortable">Type <span class="sort-arrow"></span></th> <th data-sort="ext" class="col-ext sortable">Type <span class="sort-arrow"></span></th>
<th data-sort="date" class="col-date sortable">Modified <span class="sort-arrow"></span></th> <th data-sort="date" class="col-date sortable">Modified <span class="sort-arrow"></span></th>
</tr> </tr>
<tr class="filter-row filter-row--file" title="Filter files">
<th class="col-name">
<span class="filter-row__icon" aria-hidden="true">📄</span>
<input type="text" class="column-filter" data-filter="file"
placeholder="filter files…" spellcheck="false"
aria-label="Filter by file name">
</th>
<th class="col-size"></th>
<th class="col-ext">
<input type="text" class="column-filter" data-filter="ext"
placeholder="ext…" spellcheck="false"
aria-label="Filter by extension">
</th>
<th class="col-date"></th>
</tr>
<tr class="filter-row filter-row--folder" title="Filter folders">
<th class="col-name">
<span class="filter-row__icon" aria-hidden="true">📁</span>
<input type="text" class="column-filter" data-filter="folder"
placeholder="filter folders…" spellcheck="false"
aria-label="Filter by folder name">
</th>
<th class="col-size"></th>
<th class="col-ext"></th>
<th class="col-date"></th>
</tr>
</thead> </thead>
<tbody id="browseTbody"></tbody> <tbody id="browseTbody"></tbody>
</table> </table>
@ -1122,36 +1041,6 @@ body {
local (re-enumerates the FS handle) and online (re-fetches the JSON).</dd> local (re-enumerates the FS handle) and online (re-fetches the JSON).</dd>
</dl> </dl>
<h3>Filter rows</h3>
<p>Two filter rows live in the table header:</p>
<dl>
<dt>📄 file row</dt>
<dd>Filter by file name (left input) and/or extension (Type input).
File matches stay visible together with their ancestor folders, so
the path to each hit is always shown.</dd>
<dt>📁 folder row</dt>
<dd>Filter by folder name. Matching folders show with their entire
subtree. Combined with file filter: file must also be inside a
matching folder's subtree (intersection).</dd>
</dl>
<p>Filter syntax (shared across all ZDDC tools):</p>
<dl>
<dt><code>term</code></dt>
<dd>Contains "term" (case-insensitive)</dd>
<dt><code>!term</code></dt>
<dd>Does not contain</dd>
<dt><code>^term</code></dt>
<dd>Starts with</dd>
<dt><code>term$</code></dt>
<dd>Ends with</dd>
<dt><code>a b</code></dt>
<dd>Both (AND)</dd>
<dt><code>a | b</code></dt>
<dd>Either (OR)</dd>
<dt><code>el.*spc</code></dt>
<dd>Regex — any-char + any-sequence</dd>
</dl>
<h3>Header buttons</h3> <h3>Header buttons</h3>
<dl> <dl>
<dt>Add Local Directory</dt> <dt>Add Local Directory</dt>
@ -2634,15 +2523,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
// Sort state. key: 'name' | 'size' | 'ext' | 'date'. dir: 1 or -1. // Sort state. key: 'name' | 'size' | 'ext' | 'date'. dir: 1 or -1.
sort: { key: 'name', dir: 1 }, sort: { key: 'name', dir: 1 },
// Auto-filter row state. Each is a raw string from the input,
// plus a parsed AST (zddc.filter.parse) cached on every keystroke.
// Empty raw → AST empty → matches everything.
filters: {
file: { raw: '', ast: null }, // matches against file basename
folder: { raw: '', ast: null }, // matches against folder basename
ext: { raw: '', ast: null } // matches against file extension
},
// The tree's in-memory representation. Each node: // The tree's in-memory representation. Each node:
// { id, name, isDir, size, modTime, ext, url, depth, // { id, name, isDir, size, modTime, ext, url, depth,
// parentId, expanded, loaded, childIds, isZip, zipFile, // parentId, expanded, loaded, childIds, isZip, zipFile,
@ -2925,17 +2805,14 @@ https://github.com/nodeca/pako/blob/main/LICENSE
parent.loaded = true; parent.loaded = true;
} }
// Walk visible nodes in render order. Excludes nodes whose // Walk nodes in render order. Skips the children of a collapsed
// node.visible is false (filter-hidden) and skips the children of // expandable.
// a collapsed expandable. Filter visibility is computed by
// recomputeVisibility() before this is called from render().
function visibleIds() { function visibleIds() {
var out = []; var out = [];
function walk(ids) { function walk(ids) {
for (var i = 0; i < ids.length; i++) { for (var i = 0; i < ids.length; i++) {
var n = state.nodes.get(ids[i]); var n = state.nodes.get(ids[i]);
if (!n) continue; if (!n) continue;
if (n.visible === false) continue;
out.push(ids[i]); out.push(ids[i]);
if ((n.isDir || n.isZip) && n.expanded) walk(n.childIds); if ((n.isDir || n.isZip) && n.expanded) walk(n.childIds);
} }
@ -3015,7 +2892,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
function render() { function render() {
var tbody = document.getElementById('browseTbody'); var tbody = document.getElementById('browseTbody');
if (!tbody) return; if (!tbody) return;
recomputeVisibility();
var ids = visibleIds(); var ids = visibleIds();
var html = ''; var html = '';
for (var i = 0; i < ids.length; i++) { for (var i = 0; i < ids.length; i++) {
@ -3027,111 +2903,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
renderBreadcrumbs(); renderBreadcrumbs();
} }
// Compute model-level visibility per node based on the three // Count nodes that render at the root + every expanded subtree.
// filter ASTs:
// - fileFilter → matches a file's basename
// - folderFilter→ matches a folder's basename
// - extFilter → matches a file's extension (no leading dot)
//
// Visibility rules:
// 1. A FILE is "self-matched" when it passes both file+ext filter.
// 2. A FOLDER is "self-matched" when it passes the folder filter.
// 3. A file is "in-scope" when either no folder filter is active,
// OR at least one ancestor folder is folder-self-matched.
// 4. A file is VISIBLE when self-matched AND in-scope.
// 5. A folder is VISIBLE when:
// - any descendant is visible (so the path to a hit is
// always shown), OR
// - the folder itself is folder-self-matched AND no file
// filter is active (when a file filter is set, we hide
// folders that have no matching files inside — keeps
// the result list focused).
//
// Pure model walk; the renderer just consumes node.visible. Hidden
// expandable nodes get their `expanded` flag respected even though
// they're not in the DOM, so toggling filters preserves the user's
// expand state.
function recomputeVisibility() {
var fileAst = state.filters.file.ast;
var folderAst = state.filters.folder.ast;
var extAst = state.filters.ext.ast;
var hasFile = !!(state.filters.file.raw);
var hasFolder = !!(state.filters.folder.raw);
var hasExt = !!(state.filters.ext.raw);
var anyActive = hasFile || hasFolder || hasExt;
// Fast path: nothing filtered → everything visible.
if (!anyActive) {
state.nodes.forEach(function (n) { n.visible = true; });
return;
}
var f = window.zddc && window.zddc.filter;
// Walk top-down to propagate folder scope, then bottom-up to
// propagate descendant visibility. Done in one DFS recursion.
// ZIPs are hybrids — they match FILE filter (their name is a
// filename) AND can be matched by FOLDER filter (they're
// container-like — clicking expands them like a folder).
function visit(nodeId, ancestorMatchesFolder) {
var n = state.nodes.get(nodeId);
if (!n) return false;
if (!(n.isDir || n.isZip)) {
// Plain file. Visible iff its name+ext pass file/ext
// filters AND it's inside the folder-filter scope.
var nameOk = f.matches(n.name, fileAst);
var extOk = f.matches(n.ext || '', extAst);
n.visible = nameOk && extOk && ancestorMatchesFolder;
return n.visible;
}
// Folder or zip — has childIds and contributes to scope.
// Folder self-match: the folder/zip name passes folder
// filter. A folder match also opens the file-filter scope
// for descendants.
var asFolderMatch = f.matches(n.name, folderAst);
// A zip can also match the FILE filter (it's a file too).
// Typing a zip name into file filter surfaces the zip.
// Gate on hasFile||hasExt — when neither is active, the
// empty filter matches every name and would falsely
// surface every zip regardless of the active folder filter.
var asFileMatch = n.isZip
&& (hasFile || hasExt)
&& f.matches(n.name, fileAst)
&& f.matches(n.ext || '', extAst);
var nextAncestorScope = ancestorMatchesFolder
|| asFolderMatch || asFileMatch;
var anyChildVisible = false;
for (var i = 0; i < n.childIds.length; i++) {
if (visit(n.childIds[i], nextAncestorScope)) anyChildVisible = true;
}
// Visible if:
// - any descendant is visible (path-to-hit visibility), or
// - self-folder-match with no file/ext filter active
// (let the folder surface even if it's empty/unloaded), or
// - self-file-match (for zips, where the user is searching
// for the archive by name in the file filter).
n.visible = anyChildVisible
|| (asFolderMatch && !hasFile && !hasExt)
|| asFileMatch;
return n.visible;
}
// Initial ancestor scope = folder filter empty (so files don't
// require ancestor matches when there's no folder filter).
var initialScope = !hasFolder;
for (var i = 0; i < state.rootIds.length; i++) {
visit(state.rootIds[i], initialScope);
}
}
// Count nodes that would render if no filter were active
// (i.e. anything at the root, or under an expanded ancestor).
// Used to express "<visible> of <total> shown" while a filter is on.
function expandedSetSize() { function expandedSetSize() {
var n = 0; var n = 0;
function walk(ids) { function walk(ids) {
@ -3150,14 +2922,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
function updateCount() { function updateCount() {
var el = document.getElementById('entryCount'); var el = document.getElementById('entryCount');
if (!el) return; if (!el) return;
var visible = visibleIds().length;
var total = expandedSetSize(); var total = expandedSetSize();
var anyFilter = state.filters.file.raw el.textContent = total + ' item' + (total === 1 ? '' : 's');
|| state.filters.folder.raw
|| state.filters.ext.raw;
el.textContent = anyFilter
? visible + ' of ' + total + ' shown'
: total + ' item' + (total === 1 ? '' : 's');
} }
// ── Breadcrumbs ────────────────────────────────────────────────────── // ── Breadcrumbs ──────────────────────────────────────────────────────
@ -3470,17 +3236,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
} }
render(); render();
}, },
// Update one of the three column filters and re-render. `which`
// is 'file' | 'folder' | 'ext'. Empty raw → AST cleared.
setFilter: function (which, raw) {
var slot = state.filters[which];
if (!slot) return;
slot.raw = raw || '';
slot.ast = slot.raw && window.zddc && window.zddc.filter
? window.zddc.filter.parse(slot.raw)
: null;
render();
},
pathFor: pathFor pathFor: pathFor
}; };
})(); })();
@ -3849,19 +3604,6 @@ https://github.com/nodeca/pako/blob/main/LICENSE
var refresh = document.getElementById('refreshHeaderBtn'); var refresh = document.getElementById('refreshHeaderBtn');
if (refresh) refresh.addEventListener('click', refreshListing); if (refresh) refresh.addEventListener('click', refreshListing);
// Auto-filter row inputs. There are three of them (file, folder,
// ext) — wire each by its `data-filter` attribute. Idempotent
// re: re-init.
var filterInputs = document.querySelectorAll('input.column-filter[data-filter]');
for (var fi = 0; fi < filterInputs.length; fi++) {
(function (input) {
var which = input.dataset.filter;
input.addEventListener('input', function () {
tree.setFilter(which, input.value);
});
})(filterInputs[fi]);
}
// Sort headers // Sort headers
var ths = document.querySelectorAll('#browseTable thead th.sortable'); var ths = document.querySelectorAll('#browseTable thead th.sortable');
for (var i = 0; i < ths.length; i++) { for (var i = 0; i < ths.length; i++) {

View file

@ -1464,7 +1464,7 @@ body.help-open .app-header {
</svg> </svg>
<div class="header-title-group"> <div class="header-title-group">
<span class="app-header__title">ZDDC Classifier</span> <span class="app-header__title">ZDDC Classifier</span>
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · lily-quilt-hazel</span></span> <span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
</div> </div>
<button id="addDirectoryBtn" class="btn btn-primary">Add Local Directory</button> <button id="addDirectoryBtn" class="btn btn-primary">Add Local Directory</button>
<button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh and rescan directory" aria-label="Refresh" style="font-size:1.1rem;"></button> <button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh and rescan directory" aria-label="Refresh" style="font-size:1.1rem;"></button>

View file

@ -988,7 +988,7 @@ body {
</svg> </svg>
<div class="header-title-group"> <div class="header-title-group">
<span class="app-header__title">ZDDC</span> <span class="app-header__title">ZDDC</span>
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · lily-quilt-hazel</span></span> <span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
</div> </div>
</div> </div>
<div class="header-right"> <div class="header-right">

View file

@ -1903,7 +1903,7 @@ body.help-open .app-header {
</svg> </svg>
<div class="header-title-group"> <div class="header-title-group">
<span class="app-header__title">ZDDC Markdown</span> <span class="app-header__title">ZDDC Markdown</span>
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · lily-quilt-hazel</span></span> <span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
</div> </div>
<button id="addDirectoryBtn" class="btn btn-primary" title="Add a local directory">Add Local Directory</button> <button id="addDirectoryBtn" class="btn btn-primary" title="Add a local directory">Add Local Directory</button>
<button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh directory" aria-label="Refresh"></button> <button id="refreshHeaderBtn" class="btn btn-secondary hidden" title="Refresh directory" aria-label="Refresh"></button>

View file

@ -2263,7 +2263,7 @@ dialog.modal--narrow {
</svg> </svg>
<div class="header-title-group"> <div class="header-title-group">
<span class="app-header__title">ZDDC Transmittal</span> <span class="app-header__title">ZDDC Transmittal</span>
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · lily-quilt-hazel</span></span> <span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
</div> </div>
<span id="no-js-notice" class="text-gray-400 text-xs italic">JavaScript not available</span> <span id="no-js-notice" class="text-gray-400 text-xs italic">JavaScript not available</span>
<!-- Publish split-button (Transmittal-specific primary action; <!-- Publish split-button (Transmittal-specific primary action;

View file

@ -1,9 +1,9 @@
# Generated by build.sh — do not edit. One <app>=<build label> per line. # Generated by build.sh — do not edit. One <app>=<build label> per line.
archive=v0.0.17-beta · 2026-05-10 · lily-quilt-hazel archive=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
transmittal=v0.0.17-beta · 2026-05-10 · lily-quilt-hazel transmittal=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
classifier=v0.0.17-beta · 2026-05-10 · lily-quilt-hazel classifier=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
mdedit=v0.0.17-beta · 2026-05-10 · lily-quilt-hazel mdedit=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
landing=v0.0.17-beta · 2026-05-10 · lily-quilt-hazel landing=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
form=v0.0.17-beta · 2026-05-10 · lily-quilt-hazel form=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
tables=v0.0.17-beta · 2026-05-10 · lily-quilt-hazel tables=v0.0.17-beta · 2026-05-10 · rock-cliff-boat
browse=v0.0.17-beta · 2026-05-10 · lily-quilt-hazel browse=v0.0.17-beta · 2026-05-10 · rock-cliff-boat

View file

@ -1070,7 +1070,7 @@ body.help-open .app-header {
</svg> </svg>
<div class="header-title-group"> <div class="header-title-group">
<span class="app-header__title" id="table-title">ZDDC Table</span> <span class="app-header__title" id="table-title">ZDDC Table</span>
<span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · lily-quilt-hazel</span></span> <span class="build-timestamp"><span style="color:red;font-weight:bold">v0.0.17-beta · 2026-05-10 · rock-cliff-boat</span></span>
</div> </div>
</div> </div>
<div class="header-right"> <div class="header-right">