@ponderdev/justfits 1.3.0 → 1.4.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/README.md +46 -10
- package/agents/skills/justfits/SKILL.md +12 -10
- package/package.json +2 -2
- package/src/cli.cjs +42 -20
- package/src/engine.cjs +79 -12
- package/src/kit/desktop.cjs +136 -0
- package/src/kit/family.cjs +29 -0
- package/src/kit/lang.cjs +166 -0
- package/src/kit/scan.cjs +2 -2
- package/src/kit/window.cjs +22 -2
- package/src/main.cjs +49 -14
- package/src/plan.js +128 -29
- package/src/preload.cjs +11 -0
- package/src/renderer/app.js +332 -117
- package/src/renderer/index.html +11 -4
- package/src/renderer/kit/kit.css +16 -3
- package/src/renderer/kit/kit.js +351 -34
- package/src/renderer/licenses.html +1 -1
- package/src/renderer/strings.js +1562 -0
- package/src/scan.cjs +39 -2
package/src/renderer/index.html
CHANGED
|
@@ -17,15 +17,18 @@
|
|
|
17
17
|
What follows it shows only once a file is in. -->
|
|
18
18
|
<div id="start"></div>
|
|
19
19
|
|
|
20
|
+
<!-- A sibling tool for what Just Fits does not do, when there is one (Kit.hint). -->
|
|
21
|
+
<p id="family-hint"></p>
|
|
22
|
+
|
|
20
23
|
<div id="after" class="after-file">
|
|
21
24
|
<section class="k-section">
|
|
22
25
|
<div class="k-field">
|
|
23
|
-
<label for="target">Where is it going</label>
|
|
26
|
+
<label for="target" data-t>Where is it going</label>
|
|
24
27
|
<select id="target"></select>
|
|
25
28
|
<p class="hint" id="why"></p>
|
|
26
29
|
</div>
|
|
27
30
|
<div class="k-field">
|
|
28
|
-
<label for="custom">Or aim for a size yourself</label>
|
|
31
|
+
<label for="custom" data-t>Or aim for a size yourself</label>
|
|
29
32
|
<div class="row">
|
|
30
33
|
<input type="number" id="custom" class="k-input k-number" min="1" max="20000" step="1" placeholder="25">
|
|
31
34
|
<span class="k-unit">MB</span>
|
|
@@ -34,13 +37,13 @@
|
|
|
34
37
|
<!-- Only with a folder in: its results go into a new folder beside it
|
|
35
38
|
unless this is ticked (kept through Kit.store). -->
|
|
36
39
|
<div class="k-field" id="where-field" hidden>
|
|
37
|
-
<label class="k-check"><input type="checkbox" id="beside"> Save next to the originals instead</label>
|
|
40
|
+
<label class="k-check"><input type="checkbox" id="beside"> <span data-t>Save next to the originals instead</span></label>
|
|
38
41
|
<p class="hint" id="where-hint"></p>
|
|
39
42
|
</div>
|
|
40
43
|
</section>
|
|
41
44
|
|
|
42
45
|
<p class="k-note" id="aim"></p>
|
|
43
|
-
<button type="button" id="go" class="btn btn-primary btn-wide k-action">Compress</button>
|
|
46
|
+
<button type="button" id="go" class="btn btn-primary btn-wide k-action" data-t>Compress</button>
|
|
44
47
|
|
|
45
48
|
<!-- Working, done and failed, from the kit (Kit.run in app.js). -->
|
|
46
49
|
<div id="run"></div>
|
|
@@ -49,8 +52,12 @@
|
|
|
49
52
|
</main>
|
|
50
53
|
</div>
|
|
51
54
|
|
|
55
|
+
<!-- Filled by Kit.footer(): the licences and the language, the family promise, the credit. -->
|
|
52
56
|
<footer id="footer"></footer>
|
|
53
57
|
|
|
58
|
+
<!-- strings.js first: every language's words, which kit.js reads as it
|
|
59
|
+
starts (generated by bin/strings, never edited by hand). -->
|
|
60
|
+
<script src="strings.js"></script>
|
|
54
61
|
<script src="kit/kit.js"></script>
|
|
55
62
|
<script src="app.js"></script>
|
|
56
63
|
</body>
|
package/src/renderer/kit/kit.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* PonderDev kit 1.
|
|
1
|
+
/* PonderDev kit 1.1.0, built from kit/src. Do not edit: run bin/kit-sync. */
|
|
2
2
|
/* --- tokens.css --- */
|
|
3
3
|
/* kit tokens: every value a Just tool may use. A tool's own CSS uses these
|
|
4
4
|
* through var(--...) and never a colour, font or radius of its own; the kit
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
/* type: the system's own faces, so each tool reads native on Mac, Windows
|
|
25
25
|
and Linux and ships no font files (decided 2026-11-18) */
|
|
26
|
-
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
26
|
+
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans CJK JP", sans-serif;
|
|
27
27
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
|
|
28
28
|
--size-xs: 11.5px; /* footer */
|
|
29
29
|
--size-sm: 12px; /* hints, notes, mono facts */
|
|
@@ -402,6 +402,8 @@ kbd { font-family: var(--font-mono); font-size: var(--size-sm); padding: 1px 6px
|
|
|
402
402
|
.k-menu button { display: flex; align-items: center; gap: var(--space-2); width: 100%; font: inherit; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; }
|
|
403
403
|
.k-menu button:hover, .k-menu button:focus-visible { background: var(--panel-2); }
|
|
404
404
|
.k-menu button[aria-checked="true"] { color: var(--accent); }
|
|
405
|
+
.k-menu .k-menu-action { color: var(--muted); font-size: var(--size-xs); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: var(--space-1); }
|
|
406
|
+
.k-menu [role="menuitemradio"] + .k-menu-action ~ .k-menu-action { border-top: 0; margin-top: 0; }
|
|
405
407
|
|
|
406
408
|
/* tabs (the Tool Belt) */
|
|
407
409
|
.k-tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--line); margin: var(--space-4) 0; }
|
|
@@ -446,6 +448,8 @@ kbd { font-family: var(--font-mono); font-size: var(--size-sm); padding: 1px 6px
|
|
|
446
448
|
.k-run-count { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; flex: none; }
|
|
447
449
|
.k-run-sub { display: flex; justify-content: space-between; gap: 12px; margin: 4px 0 0; font-size: 12px; color: var(--muted); }
|
|
448
450
|
.k-run-file { font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
451
|
+
.k-run-note { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
|
|
452
|
+
.k-run-note[hidden] { display: none; }
|
|
449
453
|
.k-run-cancel { margin-top: 12px; }
|
|
450
454
|
|
|
451
455
|
/* the queue: one row per file, the same marks in every tool */
|
|
@@ -515,7 +519,9 @@ li[data-q="failed"] .k-q-note { color: var(--bad); }
|
|
|
515
519
|
padding: 10px var(--space-6); border-top: 1px solid var(--line); background: var(--panel);
|
|
516
520
|
font-size: var(--size-xs); color: var(--muted);
|
|
517
521
|
}
|
|
518
|
-
.k-footer-
|
|
522
|
+
.k-footer-start { justify-self: start; display: flex; align-items: center; gap: var(--space-3); white-space: nowrap; }
|
|
523
|
+
.k-footer-lang { display: inline-flex; align-items: center; gap: 4px; }
|
|
524
|
+
.k-footer-lang svg { width: 14px; height: 14px; }
|
|
519
525
|
.k-footer-promise { justify-self: center; text-align: center; }
|
|
520
526
|
.k-footer-credit { justify-self: end; white-space: nowrap; }
|
|
521
527
|
.k-footer button { font: inherit; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
|
|
@@ -523,6 +529,13 @@ li[data-q="failed"] .k-q-note { color: var(--bad); }
|
|
|
523
529
|
.k-mark { color: var(--text); }
|
|
524
530
|
.k-mark b { font-weight: 700; color: var(--brand); }
|
|
525
531
|
|
|
532
|
+
/* --- parts/family.css --- */
|
|
533
|
+
/* kit part: a family hint: one quiet line pointing to a sibling tool. */
|
|
534
|
+
.k-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: var(--space-3) 0 0; font-size: var(--size-sm); color: var(--muted); }
|
|
535
|
+
.k-hint[hidden] { display: none; }
|
|
536
|
+
.k-hint svg { width: 16px; height: 16px; flex: none; }
|
|
537
|
+
.k-hint-go { font-weight: var(--weight-strong); }
|
|
538
|
+
|
|
526
539
|
/* --- layouts/utility.css --- */
|
|
527
540
|
/* kit layout: utility, for the one-step tools (Fits, JPEG, Zip, Clipboard and
|
|
528
541
|
* the like). Every utility tool has the same window width and one column:
|