spike(apexhtml): apex → HTML → WKWebView reading surface (#74)
Throwaway spike proving the #73 pivot chain: - sentinel pre-pass (<!--S:N-->) → apex → regex stamp to data-source-line - one WKWebView reloaded in place (no per-document remount — that was the dominant switch cost, not apex) - early HTML handoff: stdout EOF = conversion done, apex teardown reaped async (PERF-3k end-to-end 34 ms, was 82) - images via --embed-images base64: loadHTMLString fast path, no file access, no vault writes (loadFileURL path cost 4× paint) - ⌘-click links, click→source-line map, scroll→top-line map - self-check --check, headless --pipeline (0 mis-stamps corpus-wide)
This commit is contained in:
1 parent
b30c0e3dd6
commit
7afd1a00e9
3 files changed
+438
No files matched your search
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/zsh
|
||||
# ponytail: wrap the SPM binary in a minimal .app — WKWebView needs a bundle to behave.
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
swift build 2>&1 | tail -1
|
||||
APP=.build/ApexHTMLSpike.app
|
||||
rm -rf "$APP" && mkdir -p "$APP/Contents/MacOS"
|
||||
cp .build/debug/ApexHTMLSpike "$APP/Contents/MacOS/"
|
||||
cat > "$APP/Contents/Info.plist" <<'PLIST'
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleExecutable</key><string>ApexHTMLSpike</string>
|
||||
<key>CFBundleIdentifier</key><string>de.babylondreams.museion.spike-apexhtml</string>
|
||||
<key>CFBundleName</key><string>Spike — apex HTML reading</string>
|
||||
<key>CFBundlePackageType</key><string>APPL</string>
|
||||
<key>LSMinimumSystemVersion</key><string>26.0</string>
|
||||
<key>NSHighResolutionCapable</key><true/>
|
||||
</dict>
|
||||
</plist>
|
||||
PLIST
|
||||
echo "built: $APP"
|
||||
exec "$APP/Contents/MacOS/ApexHTMLSpike" "${@:-../prose/kitchen-sink.md}"
|
||||
Reference in new issue
Block a user