@laitszkin/apollo-toolkit 3.9.7 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +37 -0
- package/README.md +6 -0
- package/analyse-app-logs/scripts/__pycache__/filter_logs_by_time.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/log_cli_utils.cpython-312.pyc +0 -0
- package/analyse-app-logs/scripts/__pycache__/search_logs.cpython-312.pyc +0 -0
- package/cjk-pdf/agents/openai.yaml +5 -0
- package/docs-to-voice/scripts/__pycache__/docs_to_voice.cpython-312.pyc +0 -0
- package/generate-spec/SKILL.md +26 -4
- package/generate-spec/agents/openai.yaml +1 -0
- package/generate-spec/references/TEMPLATE_SPEC.md +117 -0
- package/generate-spec/scripts/__pycache__/create-specscpython-312.pyc +0 -0
- package/init-project-html/SKILL.md +137 -0
- package/init-project-html/agents/openai.yaml +22 -0
- package/init-project-html/lib/atlas/assets/architecture.css +140 -0
- package/init-project-html/lib/atlas/assets/viewer.client.js +93 -0
- package/init-project-html/lib/atlas/cli.js +995 -0
- package/init-project-html/lib/atlas/layout.js +229 -0
- package/init-project-html/lib/atlas/render.js +485 -0
- package/init-project-html/lib/atlas/schema.js +310 -0
- package/init-project-html/lib/atlas/state.js +402 -0
- package/init-project-html/references/TEMPLATE_SPEC.md +137 -0
- package/init-project-html/references/architecture-page.template.html +35 -0
- package/init-project-html/references/architecture.css +1059 -0
- package/init-project-html/sample-demo/resources/project-architecture/assets/architecture.css +140 -0
- package/init-project-html/sample-demo/resources/project-architecture/assets/viewer.client.js +93 -0
- package/init-project-html/sample-demo/resources/project-architecture/atlas/atlas.index.yaml +34 -0
- package/init-project-html/sample-demo/resources/project-architecture/atlas/features/get-invite-codes.yaml +159 -0
- package/init-project-html/sample-demo/resources/project-architecture/atlas/features/invite-code-registration.yaml +160 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/index.html +69 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/invite-code-generator.html +50 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/invite-issuance-service.html +72 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/postgresql.html +66 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/public-api.html +70 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/get-invite-codes/web-get-invite-ui.html +67 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/invite-code-registration/index.html +63 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/invite-code-registration/postgresql.html +68 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/invite-code-registration/public-api.html +65 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/invite-code-registration/registration-service.html +79 -0
- package/init-project-html/sample-demo/resources/project-architecture/features/invite-code-registration/web-register-ui.html +67 -0
- package/init-project-html/sample-demo/resources/project-architecture/index.html +234 -0
- package/init-project-html/scripts/architecture.js +314 -0
- package/katex/scripts/__pycache__/render_katex.cpython-312.pyc +0 -0
- package/lib/cli.js +2 -0
- package/lib/tool-runner.js +7 -0
- package/merge-conflict-resolver/agents/openai.yaml +5 -0
- package/open-github-issue/scripts/__pycache__/open_github_issue.cpython-312.pyc +0 -0
- package/package.json +6 -2
- package/read-github-issue/scripts/__pycache__/find_issues.cpython-312.pyc +0 -0
- package/read-github-issue/scripts/__pycache__/read_issue.cpython-312.pyc +0 -0
- package/resolve-review-comments/scripts/__pycache__/review_threads.cpython-312.pyc +0 -0
- package/spec-to-project-html/SKILL.md +114 -0
- package/spec-to-project-html/agents/openai.yaml +18 -0
- package/spec-to-project-html/references/TEMPLATE_SPEC.md +111 -0
- package/text-to-short-video/scripts/__pycache__/enforce_video_aspect_ratio.cpython-312.pyc +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* viewer.client.js — pan/zoom for the macro atlas SVG. No deps; wires
|
|
2
|
+
* onto any element marked [data-pan-zoom-viewport] containing one
|
|
3
|
+
* [data-atlas-svg] SVG. Mouse wheel zooms around the cursor; drag pans;
|
|
4
|
+
* toolbar buttons handle +/-/Fit; keyboard arrows pan. */
|
|
5
|
+
|
|
6
|
+
(function () {
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
const viewport = document.querySelector('[data-pan-zoom-viewport]');
|
|
10
|
+
if (!viewport) return;
|
|
11
|
+
const svg = viewport.querySelector('[data-atlas-svg]');
|
|
12
|
+
if (!svg) return;
|
|
13
|
+
|
|
14
|
+
const initial = svg.getAttribute('viewBox');
|
|
15
|
+
if (!initial) return;
|
|
16
|
+
const [ix, iy, iw, ih] = initial.split(/\s+/).map(Number);
|
|
17
|
+
const state = { x: ix, y: iy, w: iw, h: ih };
|
|
18
|
+
|
|
19
|
+
function apply() {
|
|
20
|
+
svg.setAttribute('viewBox', `${state.x} ${state.y} ${state.w} ${state.h}`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function zoom(factor, cx, cy) {
|
|
24
|
+
const newW = Math.max(40, Math.min(state.w * factor, iw * 8));
|
|
25
|
+
const newH = newW * (state.h / state.w);
|
|
26
|
+
if (cx == null) { cx = state.x + state.w / 2; cy = state.y + state.h / 2; }
|
|
27
|
+
state.x = cx - (cx - state.x) * (newW / state.w);
|
|
28
|
+
state.y = cy - (cy - state.y) * (newH / state.h);
|
|
29
|
+
state.w = newW;
|
|
30
|
+
state.h = newH;
|
|
31
|
+
apply();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function clientToSvg(evt) {
|
|
35
|
+
const rect = svg.getBoundingClientRect();
|
|
36
|
+
const xRatio = (evt.clientX - rect.left) / rect.width;
|
|
37
|
+
const yRatio = (evt.clientY - rect.top) / rect.height;
|
|
38
|
+
return { x: state.x + xRatio * state.w, y: state.y + yRatio * state.h };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
viewport.addEventListener('wheel', function (evt) {
|
|
42
|
+
if (!evt.ctrlKey && !evt.metaKey && Math.abs(evt.deltaY) < 4 && Math.abs(evt.deltaX) < 4) return;
|
|
43
|
+
evt.preventDefault();
|
|
44
|
+
const factor = evt.deltaY > 0 ? 1.1 : 1 / 1.1;
|
|
45
|
+
const pt = clientToSvg(evt);
|
|
46
|
+
zoom(factor, pt.x, pt.y);
|
|
47
|
+
}, { passive: false });
|
|
48
|
+
|
|
49
|
+
let dragging = null;
|
|
50
|
+
viewport.addEventListener('pointerdown', function (evt) {
|
|
51
|
+
if (evt.button !== 0) return;
|
|
52
|
+
dragging = { x: evt.clientX, y: evt.clientY };
|
|
53
|
+
viewport.classList.add('is-grabbing');
|
|
54
|
+
viewport.setPointerCapture(evt.pointerId);
|
|
55
|
+
});
|
|
56
|
+
viewport.addEventListener('pointermove', function (evt) {
|
|
57
|
+
if (!dragging) return;
|
|
58
|
+
const rect = svg.getBoundingClientRect();
|
|
59
|
+
const dx = ((evt.clientX - dragging.x) / rect.width) * state.w;
|
|
60
|
+
const dy = ((evt.clientY - dragging.y) / rect.height) * state.h;
|
|
61
|
+
state.x -= dx;
|
|
62
|
+
state.y -= dy;
|
|
63
|
+
dragging = { x: evt.clientX, y: evt.clientY };
|
|
64
|
+
apply();
|
|
65
|
+
});
|
|
66
|
+
function endDrag(evt) {
|
|
67
|
+
if (!dragging) return;
|
|
68
|
+
dragging = null;
|
|
69
|
+
viewport.classList.remove('is-grabbing');
|
|
70
|
+
try { viewport.releasePointerCapture(evt.pointerId); } catch (e) { /* ignore */ }
|
|
71
|
+
}
|
|
72
|
+
viewport.addEventListener('pointerup', endDrag);
|
|
73
|
+
viewport.addEventListener('pointercancel', endDrag);
|
|
74
|
+
viewport.addEventListener('pointerleave', endDrag);
|
|
75
|
+
|
|
76
|
+
document.addEventListener('keydown', function (evt) {
|
|
77
|
+
if (evt.target && (evt.target.tagName === 'INPUT' || evt.target.tagName === 'TEXTAREA')) return;
|
|
78
|
+
const step = state.w * 0.08;
|
|
79
|
+
if (evt.key === 'ArrowLeft') { state.x -= step; apply(); }
|
|
80
|
+
else if (evt.key === 'ArrowRight') { state.x += step; apply(); }
|
|
81
|
+
else if (evt.key === 'ArrowUp') { state.y -= step; apply(); }
|
|
82
|
+
else if (evt.key === 'ArrowDown') { state.y += step; apply(); }
|
|
83
|
+
else if (evt.key === '+' || evt.key === '=') { zoom(1 / 1.2); }
|
|
84
|
+
else if (evt.key === '-' || evt.key === '_') { zoom(1.2); }
|
|
85
|
+
else if (evt.key === '0') { state.x = ix; state.y = iy; state.w = iw; state.h = ih; apply(); }
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
document.querySelectorAll('[data-pan-zoom="zoom-in"]').forEach((btn) => btn.addEventListener('click', () => zoom(1 / 1.2)));
|
|
89
|
+
document.querySelectorAll('[data-pan-zoom="zoom-out"]').forEach((btn) => btn.addEventListener('click', () => zoom(1.2)));
|
|
90
|
+
document.querySelectorAll('[data-pan-zoom="fit"]').forEach((btn) => btn.addEventListener('click', () => {
|
|
91
|
+
state.x = ix; state.y = iy; state.w = iw; state.h = ih; apply();
|
|
92
|
+
}));
|
|
93
|
+
})();
|