@bendyline/gilde 0.1.79 → 0.1.80

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.
Files changed (32) hide show
  1. package/data/gezel-templates/ar/archivaris/manifest.json +1 -1
  2. package/data/gezel-templates/ar/archivaris/versions/1.0.1/about.md +26 -0
  3. package/data/gezel-templates/ar/archivaris/versions/1.0.1/manifest.json +10 -0
  4. package/data/gezel-templates/index.json +1 -1
  5. package/data/gezel-templates/pe/penningmeester/versions/1.0.1/about.md +23 -0
  6. package/data/gezel-templates/pe/penningmeester/versions/1.0.1/manifest.json +10 -0
  7. package/data/gezel-templates/raw-index.json +1 -1
  8. package/data/gezel-templates/zo/zorgcoordinator/manifest.json +1 -1
  9. package/data/gezel-templates/zo/zorgcoordinator/versions/1.0.1/about.md +23 -0
  10. package/data/gezel-templates/zo/zorgcoordinator/versions/1.0.1/manifest.json +10 -0
  11. package/data/project-types/ca/caregiving-binder/manifest.json +1 -1
  12. package/data/project-types/ca/caregiving-binder/versions/1.1.1/about.md +7 -0
  13. package/data/project-types/ca/caregiving-binder/versions/1.1.1/care.json +4 -0
  14. package/data/project-types/ca/caregiving-binder/versions/1.1.1/manifest.json +178 -0
  15. package/data/project-types/ca/caregiving-binder/versions/1.1.1/meds.json +8 -0
  16. package/data/project-types/ca/caregiving-binder/versions/1.1.1/mission.md +7 -0
  17. package/data/project-types/ca/caregiving-binder/versions/1.1.1/pages/dashboard/index.html +265 -0
  18. package/data/project-types/ho/household-budget/manifest.json +1 -1
  19. package/data/project-types/ho/household-budget/versions/1.0.2/about.md +6 -0
  20. package/data/project-types/ho/household-budget/versions/1.0.2/ledger.json +5 -0
  21. package/data/project-types/ho/household-budget/versions/1.0.2/manifest.json +163 -0
  22. package/data/project-types/ho/household-budget/versions/1.0.2/mission.md +5 -0
  23. package/data/project-types/ho/household-budget/versions/1.0.2/pages/dashboard/index.html +233 -0
  24. package/data/project-types/index.json +1 -1
  25. package/data/project-types/li/life-binder/manifest.json +1 -1
  26. package/data/project-types/li/life-binder/versions/1.0.2/about.md +7 -0
  27. package/data/project-types/li/life-binder/versions/1.0.2/documents.json +145 -0
  28. package/data/project-types/li/life-binder/versions/1.0.2/manifest.json +137 -0
  29. package/data/project-types/li/life-binder/versions/1.0.2/mission.md +6 -0
  30. package/data/project-types/li/life-binder/versions/1.0.2/pages/dashboard/index.html +147 -0
  31. package/data/project-types/raw-index.json +1 -1
  32. package/package.json +1 -1
@@ -0,0 +1,233 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="gezel-demo" content="standalone" />
7
+ <title>Household budget</title>
8
+ <style>
9
+ :root {
10
+ color-scheme: light dark;
11
+ --bg: #faf7f2; --card: #fff; --ink: #2b2620; --muted: #7a7166;
12
+ --accent: #b5651d; --track: #ece5da; --good: #4a7c59; --warn: #a4552e;
13
+ }
14
+ @media (prefers-color-scheme: dark) {
15
+ :root {
16
+ --bg: #1c1a17; --card: #262320; --ink: #efe9e0; --muted: #a59a8c;
17
+ --accent: #e0894a; --track: #3a352f; --good: #7fae8d; --warn: #d98a63;
18
+ }
19
+ }
20
+ * { box-sizing: border-box; }
21
+ body { margin: 0; font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--ink); padding: 1.5rem 1.25rem; }
22
+ main { max-width: 760px; margin: 0 auto; }
23
+ h1 { font-family: Georgia, 'PT Serif', 'Times New Roman', serif; font-size: 1.35rem; font-weight: 600; margin: 0 0 0.15rem; }
24
+ .sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 1rem; }
25
+ .tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1rem; }
26
+ .tile { background: var(--card); border: 1px solid var(--track); border-radius: 10px; padding: 0.7rem 0.85rem; }
27
+ .tile .n { font-size: 1.35rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
28
+ .tile .n.good { color: var(--good); }
29
+ .tile .n.warn { color: var(--warn); }
30
+ .tile .l { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
31
+ .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
32
+ .panel { background: var(--card); border: 1px solid var(--track); border-radius: 10px; padding: 0.85rem 1rem; font-size: 0.85rem; }
33
+ .panel h2 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 0.5rem; }
34
+ .bar-row { display: grid; grid-template-columns: 7.5rem 1fr 4.5rem; gap: 0.5rem; align-items: center; margin: 0.3rem 0; }
35
+ .bar-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
36
+ .bar { background: var(--track); border-radius: 4px; height: 10px; overflow: hidden; }
37
+ .bar > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
38
+ .bar-row .amt { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
39
+ .entries { margin: 0; padding-left: 1.05rem; }
40
+ .entries li { margin: 0.25rem 0; color: var(--muted); }
41
+ .entries li strong { color: var(--ink); font-weight: 600; }
42
+ form { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 0.4rem; margin-top: 0.5rem; }
43
+ input { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--track); border-radius: 6px; padding: 0.35rem 0.5rem; min-width: 0; }
44
+ button { font: inherit; border: 1px solid var(--track); background: var(--card); color: var(--ink); border-radius: 6px; padding: 0.35rem 0.8rem; cursor: pointer; }
45
+ button:hover { border-color: var(--accent); }
46
+ button:disabled { opacity: 0.5; cursor: default; }
47
+ .banner { border: 1px solid var(--accent); border-radius: 6px; padding: 0.45rem 0.7rem; font-size: 0.85rem; margin-bottom: 0.75rem; display: none; }
48
+ .banner.show { display: block; }
49
+ .empty { color: var(--muted); font-style: italic; }
50
+ @media (max-width: 640px) { .cols { grid-template-columns: 1fr; } .tiles { grid-template-columns: 1fr 1fr; } }
51
+ + .demo-banner {
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: space-between;
55
+ gap: 0.75rem;
56
+ margin: 0 0 0.85rem;
57
+ padding: 0.5rem 0.65rem;
58
+ border: 1px solid var(--accent, #8a5a2b);
59
+ border-radius: 6px;
60
+ background: color-mix(in srgb, var(--card, var(--surface, #fffdf8)) 88%, var(--accent, #8a5a2b));
61
+ color: var(--ink, #2b2620);
62
+ font-size: 0.8rem;
63
+ }
64
+ .demo-banner[hidden] { display: none; }
65
+ .demo-banner strong { font-weight: 700; }
66
+ .demo-reset {
67
+ flex: none;
68
+ padding: 0.25rem 0.5rem;
69
+ border: 1px solid var(--accent, #8a5a2b);
70
+ border-radius: 6px;
71
+ background: var(--card, var(--surface, #fffdf8));
72
+ color: var(--ink, #2b2620);
73
+ cursor: pointer;
74
+ font: inherit;
75
+ }
76
+ .demo-reset:hover { border-color: var(--ink, #2b2620); }
77
+ </style>
78
+ </head>
79
+ <body>
80
+ <main>
81
+ + <div class="demo-banner" data-gezel-demo-banner hidden>
82
+ <span><strong>Demo mode</strong> — sample data stays in this page.</span>
83
+ <button type="button" class="demo-reset" onclick="location.reload()">Reset demo</button>
84
+ </div>
85
+ <div class="banner" id="banner"></div>
86
+ <h1>Household budget</h1>
87
+ <p class="sub" id="sub">Loading the ledger…</p>
88
+ <div class="tiles">
89
+ <div class="tile"><div class="n good" id="t-in">—</div><div class="l">In this month</div></div>
90
+ <div class="tile"><div class="n warn" id="t-out">—</div><div class="l">Out this month</div></div>
91
+ <div class="tile"><div class="n" id="t-net">—</div><div class="l">Net</div></div>
92
+ </div>
93
+ <div class="cols">
94
+ <div class="panel">
95
+ <h2>Where it goes</h2>
96
+ <div id="cats"><p class="empty">No spending recorded this month.</p></div>
97
+ </div>
98
+ <div class="panel">
99
+ <h2>Recent entries</h2>
100
+ <ul class="entries" id="entries"><li class="empty">Nothing yet — tell your Penningmeester, or use quick add.</li></ul>
101
+ <h2 style="margin-top: 0.9rem">Quick add expense</h2>
102
+ <form id="quick">
103
+ <input id="q-amount" type="number" step="0.01" min="0.01" placeholder="12.50" required />
104
+ <input id="q-category" type="text" placeholder="groceries" required />
105
+ <button type="submit" id="q-go">Add</button>
106
+ </form>
107
+ </div>
108
+ </div>
109
+ </main>
110
+ <script>
111
+ (function () {
112
+ 'use strict';
113
+ var gezelPage = (function () {
114
+ var seq = 0; var pending = {};
115
+ window.addEventListener('message', function (event) {
116
+ var d = event.data;
117
+ if (!d || d.__gezelPageResult !== true || typeof d.id !== 'string') return;
118
+ var entry = pending[d.id]; if (!entry) return;
119
+ delete pending[d.id]; clearTimeout(entry.timer);
120
+ if (d.ok) entry.resolve(d); else entry.reject(new Error(d.error || 'invoke failed'));
121
+ });
122
+ return {
123
+ embedded: function () { return demoMode || Boolean(capability && projectId); },
124
+ invoke: function (tool, input) {
125
+ return new Promise(function (resolve, reject) {
126
+ if (demoMode) { resolve(demoInvoke(tool, input)); return; }
127
+ if (window.parent === window) { reject(new Error('not embedded in Gezel')); return; }
128
+ seq += 1; var id = 'pi-' + Date.now() + '-' + seq;
129
+ pending[id] = { resolve: resolve, reject: reject, timer: setTimeout(function () { delete pending[id]; reject(new Error('invoke timed out')); }, 45000) };
130
+ window.parent.postMessage({ __gezelPageInvoke: true, id: id, tool: tool, input: input || {} }, '*');
131
+ });
132
+ },
133
+ refresh: function () { if (!demoMode && window.parent !== window) window.parent.postMessage({ __gezelPageRefresh: true }, '*'); },
134
+ };
135
+ })();
136
+
137
+ var parts = location.pathname.split('/').filter(Boolean);
138
+ var typeIdx = parts.indexOf('type');
139
+ var capability = typeIdx > 0 ? parts[typeIdx - 1] : null;
140
+ var projectId = typeIdx >= 0 ? parts[typeIdx + 1] : null;
141
+ var failedPolls = 0;
142
+ var demoMode = !capability || !projectId;
143
+ var demoLedger = { currency: 'USD', entries: [
144
+ { kind: 'in', amountCents: 520000, category: 'Income', note: 'Monthly pay', at: new Date().toISOString() },
145
+ { kind: 'out', amountCents: 146000, category: 'Housing', note: 'Rent', at: new Date().toISOString() },
146
+ { kind: 'out', amountCents: 58200, category: 'Groceries', note: 'Weekly shops', at: new Date().toISOString() },
147
+ { kind: 'out', amountCents: 22400, category: 'Transport', note: 'Train and fuel', at: new Date().toISOString() },
148
+ { kind: 'out', amountCents: 18900, category: 'Eating out', note: 'Dinner with friends', at: new Date().toISOString() },
149
+ ] };
150
+ if (demoMode) document.querySelector('[data-gezel-demo-banner]').hidden = false;
151
+
152
+ function esc(s) { return String(s).replace(/[&<>"]/g, function (c) { return { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;' }[c]; }); }
153
+ function fmt(cents) {
154
+ var sign = cents < 0 ? '-' : '';
155
+ var abs = Math.abs(cents);
156
+ return sign + Math.floor(abs / 100) + '.' + String(abs % 100).padStart(2, '0');
157
+ }
158
+ function setBanner(text) { var el = document.getElementById('banner'); el.textContent = text || ''; el.className = text ? 'banner show' : 'banner'; }
159
+ function demoInvoke(tool, input) {
160
+ if (tool !== 'record_expense') throw new Error('Unknown demo action: ' + tool);
161
+ demoLedger.entries.push({
162
+ kind: 'out',
163
+ amountCents: Math.round(Number(input.amount) * 100),
164
+ category: input.category,
165
+ at: new Date().toISOString(),
166
+ });
167
+ return { ok: true };
168
+ }
169
+
170
+ function render(ledger) {
171
+ var month = new Date().toISOString().slice(0, 7);
172
+ var entries = (ledger.entries || []).filter(function (e) { return typeof e.at === 'string'; });
173
+ var monthEntries = entries.filter(function (e) { return e.at.slice(0, 7) === month; });
174
+ var inC = 0, outC = 0; var byCat = {};
175
+ monthEntries.forEach(function (e) {
176
+ if (e.kind === 'in') inC += e.amountCents;
177
+ else { outC += e.amountCents; byCat[e.category] = (byCat[e.category] || 0) + e.amountCents; }
178
+ });
179
+ document.getElementById('sub').textContent = month + ' · ' + (ledger.currency || '') + ' · ' + entries.length + ' entr' + (entries.length === 1 ? 'y' : 'ies') + ' all time';
180
+ document.getElementById('t-in').textContent = fmt(inC);
181
+ document.getElementById('t-out').textContent = fmt(outC);
182
+ var net = document.getElementById('t-net');
183
+ net.textContent = fmt(inC - outC);
184
+ net.className = 'n ' + (inC - outC >= 0 ? 'good' : 'warn');
185
+
186
+ var cats = Object.entries(byCat).sort(function (a, b) { return b[1] - a[1]; }).slice(0, 7);
187
+ var max = cats.length ? cats[0][1] : 1;
188
+ document.getElementById('cats').innerHTML = cats.length
189
+ ? cats.map(function (pair) {
190
+ return '<div class="bar-row"><span class="name">' + esc(pair[0]) + '</span><span class="bar"><span style="width:' + Math.max(4, Math.round((pair[1] / max) * 100)) + '%"></span></span><span class="amt">' + fmt(pair[1]) + '</span></div>';
191
+ }).join('')
192
+ : '<p class="empty">No spending recorded this month.</p>';
193
+
194
+ var recent = entries.slice(-7).reverse();
195
+ if (recent.length) {
196
+ document.getElementById('entries').innerHTML = recent.map(function (e) {
197
+ return '<li><strong>' + (e.kind === 'in' ? '+' : '-') + fmt(e.amountCents) + '</strong> ' + esc(e.category) + (e.note ? ' — ' + esc(e.note) : '') + '</li>';
198
+ }).join('');
199
+ }
200
+ }
201
+
202
+ function poll() {
203
+ if (demoMode) { render(demoLedger); return Promise.resolve(); }
204
+ if (!capability || !projectId) return Promise.resolve();
205
+ return fetch('/preview/' + encodeURIComponent(capability) + '/workspace/' + encodeURIComponent(projectId) + '/ledger.json', { cache: 'no-store' })
206
+ .then(function (r) { if (!r.ok) throw new Error('poll ' + r.status); return r.json(); })
207
+ .then(function (next) { failedPolls = 0; render(next); })
208
+ .catch(function () { failedPolls += 1; if (failedPolls === 3) gezelPage.refresh(); });
209
+ }
210
+
211
+ document.getElementById('quick').addEventListener('submit', function (ev) {
212
+ ev.preventDefault();
213
+ var amount = parseFloat(document.getElementById('q-amount').value);
214
+ var category = document.getElementById('q-category').value.trim();
215
+ if (!(amount > 0) || !category) return;
216
+ var btn = document.getElementById('q-go');
217
+ btn.disabled = true;
218
+ gezelPage.invoke('record_expense', { amount: amount, category: category })
219
+ .then(function () {
220
+ setBanner('');
221
+ document.getElementById('q-amount').value = '';
222
+ document.getElementById('q-category').value = '';
223
+ return poll();
224
+ })
225
+ .catch(function (err) { setBanner(String(err && err.message ? err.message : err)); })
226
+ .then(function () { btn.disabled = false; });
227
+ });
228
+
229
+ poll().then(function () { setInterval(function () { void poll(); }, 5000); });
230
+ })();
231
+ </script>
232
+ </body>
233
+ </html>