@hadoku/jobplatform 3.42.70 → 3.42.71

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 CHANGED
@@ -147,8 +147,11 @@ the edge degrades to `public` rather than being trusted.
147
147
 
148
148
  ## Getting access
149
149
 
150
- Installing, the dev server and the signed-in e2e suite need your own credential.
151
- Getting one is the same for every hadoku repo, so the steps live on one page:
150
+ A fresh clone installs, builds and passes every check with no credential and no
151
+ `.npmrc`: the `@wolffm/*` dev dependencies are npm aliases of their public npmjs copies
152
+ (`npm:@hadoku/<name>`). The dev server and the signed-in e2e suite talk to the real
153
+ hadoku.me API, so those need your own credential. Getting one is the same for every
154
+ hadoku repo, so the steps live on one page:
152
155
  **[hadoku.me/docs/contributing/#jobplatform](https://hadoku.me/docs/contributing/#jobplatform)**.
153
156
  The identity to ask for is `jobplatform-service-key`. Once you have it, `pnpm dev` and
154
157
  `pnpm test:e2e` work as they are: they run through dev-vault (a dev dependency).
@@ -157,12 +160,11 @@ The identity to ask for is `jobplatform-service-key`. Once you have it, `pnpm de
157
160
 
158
161
  ## Development
159
162
 
160
- Requires `pnpm`, and a credential for installing and for the dev server (see
161
- [Getting access](#getting-access)). Without one a clone builds and tests but does not
162
- fully run.
163
+ Requires Node 22+ and `pnpm`. Installing and every check need nothing else; the dev
164
+ server needs a credential (see [Getting access](#getting-access)).
163
165
 
164
166
  ```bash
165
- pnpm install # outside the fleet: npx @hadoku/dev-vault -- pnpm install
167
+ pnpm install
166
168
 
167
169
  pnpm dev # dev server on :5173
168
170
  pnpm build # build both packages
@@ -1,7 +1,7 @@
1
1
  import { jsxs as i, Fragment as G, jsx as a } from "react/jsx-runtime";
2
2
  import { useRef as K, useState as l, useEffect as Q } from "react";
3
- import { u as V, i as h, J as X } from "./entry-D7QDbdxu.js";
4
- import { l as I, s as ee, a as te, d as ae } from "./pipeline-Es-b-u_8.js";
3
+ import { u as V, i as h, J as X } from "./entry-9LEkYNMB.js";
4
+ import { l as I, s as ee, a as te, d as ae } from "./pipeline-BZkEg05A.js";
5
5
  const ne = {
6
6
  notes: null,
7
7
  priority: null,
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as e, Fragment as K } from "react/jsx-runtime";
2
2
  import { useState as _, useMemo as W, useCallback as Q, useEffect as V } from "react";
3
- import { l as M, a as J, J as S, s as U, f as X, b as Z, u as ee, c as ne, d as te } from "./entry-D7QDbdxu.js";
3
+ import { l as M, a as J, J as S, s as U, f as X, b as Z, u as ee, c as ne, d as te } from "./entry-9LEkYNMB.js";
4
4
  function F(r) {
5
5
  return r.replace(/\*/g, " ").toLowerCase().replace(/n't\b/g, " not ").replace(/[^a-z0-9]+/g, " ").trim();
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
2
  import { useState as s, useRef as f, useEffect as h } from "react";
3
- import { u as _, k as j } from "./entry-D7QDbdxu.js";
3
+ import { u as _, k as j } from "./entry-9LEkYNMB.js";
4
4
  function y(e) {
5
5
  const t = e.work_experience?.find((i) => i.current) ?? e.work_experience?.[0];
6
6
  return [
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { u as _, J as j, j as g } from "./entry-D7QDbdxu.js";
2
+ import { u as _, J as j, j as g } from "./entry-9LEkYNMB.js";
3
3
  const o = (s) => s === null ? "—" : `${Math.round(s * 100)}%`;
4
4
  function h(s) {
5
5
  return (/* @__PURE__ */ new Date(`${s}T00:00:00Z`)).toLocaleDateString(void 0, { month: "short", day: "numeric", timeZone: "UTC" });
@@ -1,6 +1,6 @@
1
1
  import { jsxs as t, jsx as a, Fragment as d } from "react/jsx-runtime";
2
2
  import { useState as i, useEffect as _ } from "react";
3
- import { g as y, J as b, D as v } from "./entry-D7QDbdxu.js";
3
+ import { g as y, J as b, D as v } from "./entry-9LEkYNMB.js";
4
4
  import { g, p as E, a as P } from "./packets-BfqJIYHB.js";
5
5
  function L({ auth: f, jobId: m, slug: n, onClose: s }) {
6
6
  const [e, h] = i(null), [o, k] = i(null), [r, j] = i(null), [p, u] = i(null);
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { u, e as k, J as p } from "./entry-D7QDbdxu.js";
2
+ import { u, e as k, J as p } from "./entry-9LEkYNMB.js";
3
3
  import { p as j } from "./packets-BfqJIYHB.js";
4
4
  function h(c) {
5
5
  const t = new Date(c);
@@ -0,0 +1,413 @@
1
+ import { jsxs as n, jsx as a, Fragment as F } from "react/jsx-runtime";
2
+ import { useState as h, useEffect as P, useMemo as I } from "react";
3
+ import { J as D, u as O, i as L, h as B } from "./entry-9LEkYNMB.js";
4
+ import { i as J, g as Y } from "./pipeline-BZkEg05A.js";
5
+ const G = [
6
+ { value: "saved", label: "Saved" },
7
+ { value: "interested", label: "Interested" },
8
+ { value: "applied", label: "Applied" },
9
+ { value: "interviewing", label: "Interviewing" }
10
+ ], R = {
11
+ title: "",
12
+ company: "",
13
+ location: "",
14
+ description: ""
15
+ };
16
+ function H({
17
+ auth: e,
18
+ onImported: l,
19
+ onOpen: d
20
+ }) {
21
+ const [o, _] = h(""), [c, b] = h("saved"), [i, v] = h(!1), [u, A] = h(null), [N, w] = h(null), [f, k] = h(!1), [g, $] = h(R), T = async (r) => {
22
+ if (!(!o.trim() || i)) {
23
+ v(!0), w(null), A(null);
24
+ try {
25
+ const y = await J(o.trim(), c, e, r);
26
+ A(y), _(""), $(R), k(!1), l();
27
+ } catch (y) {
28
+ w(y instanceof D ? y.message : "Import failed");
29
+ } finally {
30
+ v(!1);
31
+ }
32
+ }
33
+ }, j = (r, y) => $((S) => ({ ...S, [r]: y }));
34
+ return /* @__PURE__ */ n("div", { className: "jp-import", "data-testid": "import-posting", children: [
35
+ /* @__PURE__ */ n(
36
+ "form",
37
+ {
38
+ className: "jp-import__form",
39
+ onSubmit: (r) => {
40
+ r.preventDefault(), T(f ? g : void 0);
41
+ },
42
+ children: [
43
+ /* @__PURE__ */ a(
44
+ "input",
45
+ {
46
+ type: "url",
47
+ className: "jp-jobs__search",
48
+ placeholder: "Add a posting by URL — Greenhouse, Lever, Ashby or a company careers page",
49
+ value: o,
50
+ onChange: (r) => _(r.target.value),
51
+ "aria-label": "Posting URL",
52
+ required: !0
53
+ }
54
+ ),
55
+ /* @__PURE__ */ a(
56
+ "select",
57
+ {
58
+ className: "jp-import__state",
59
+ value: c,
60
+ onChange: (r) => b(r.target.value),
61
+ "aria-label": "Add it as",
62
+ children: G.map((r) => /* @__PURE__ */ a("option", { value: r.value, children: r.label }, r.value))
63
+ }
64
+ ),
65
+ !f && /* @__PURE__ */ a(
66
+ "button",
67
+ {
68
+ type: "submit",
69
+ className: "jp-drawer__cta jp-drawer__cta--primary",
70
+ disabled: i || !o.trim(),
71
+ children: i ? "Reading the posting…" : "Add"
72
+ }
73
+ ),
74
+ f && /* @__PURE__ */ n("fieldset", { className: "jp-import__manual", "data-testid": "import-manual", children: [
75
+ /* @__PURE__ */ a("legend", { children: "Type it in" }),
76
+ /* @__PURE__ */ n("label", { className: "jp-import__field", children: [
77
+ /* @__PURE__ */ a("span", { children: "Title *" }),
78
+ /* @__PURE__ */ a(
79
+ "input",
80
+ {
81
+ value: g.title,
82
+ onChange: (r) => j("title", r.target.value),
83
+ required: !0,
84
+ maxLength: 300,
85
+ "data-testid": "import-manual-title"
86
+ }
87
+ )
88
+ ] }),
89
+ /* @__PURE__ */ n("label", { className: "jp-import__field", children: [
90
+ /* @__PURE__ */ a("span", { children: "Company *" }),
91
+ /* @__PURE__ */ a(
92
+ "input",
93
+ {
94
+ value: g.company,
95
+ onChange: (r) => j("company", r.target.value),
96
+ required: !0,
97
+ maxLength: 200,
98
+ "data-testid": "import-manual-company"
99
+ }
100
+ )
101
+ ] }),
102
+ /* @__PURE__ */ n("label", { className: "jp-import__field", children: [
103
+ /* @__PURE__ */ a("span", { children: "Location" }),
104
+ /* @__PURE__ */ a(
105
+ "input",
106
+ {
107
+ value: g.location,
108
+ onChange: (r) => j("location", r.target.value),
109
+ placeholder: "Seattle, WA — or Remote",
110
+ maxLength: 200
111
+ }
112
+ )
113
+ ] }),
114
+ /* @__PURE__ */ n("label", { className: "jp-import__field jp-import__field--wide", children: [
115
+ /* @__PURE__ */ a("span", { children: "Notes or description" }),
116
+ /* @__PURE__ */ a(
117
+ "textarea",
118
+ {
119
+ rows: 4,
120
+ value: g.description,
121
+ onChange: (r) => j("description", r.target.value),
122
+ maxLength: 2e4,
123
+ placeholder: "Paste the posting, or what the recruiter told you"
124
+ }
125
+ )
126
+ ] }),
127
+ /* @__PURE__ */ a("p", { className: "jp-muted jp-import__field--wide", children: "Only people tracking it see a posting added by hand." }),
128
+ /* @__PURE__ */ n("div", { className: "jp-import__actions jp-import__field--wide", children: [
129
+ /* @__PURE__ */ a(
130
+ "button",
131
+ {
132
+ type: "submit",
133
+ className: "jp-drawer__cta jp-drawer__cta--primary",
134
+ disabled: i || !o.trim() || !g.title.trim() || !g.company.trim(),
135
+ children: i ? "Adding…" : "Add by hand"
136
+ }
137
+ ),
138
+ /* @__PURE__ */ a(
139
+ "button",
140
+ {
141
+ type: "button",
142
+ className: "jp-drawer__link",
143
+ onClick: () => k(!1),
144
+ children: "Cancel"
145
+ }
146
+ )
147
+ ] })
148
+ ] })
149
+ ]
150
+ }
151
+ ),
152
+ N && /* @__PURE__ */ n("p", { className: "jp-error", "data-testid": "import-error", children: [
153
+ N,
154
+ !f && /* @__PURE__ */ n(F, { children: [
155
+ " ",
156
+ /* @__PURE__ */ a(
157
+ "button",
158
+ {
159
+ type: "button",
160
+ className: "jp-drawer__link",
161
+ onClick: () => {
162
+ k(!0), w(null);
163
+ },
164
+ "data-testid": "import-manual-open",
165
+ children: "Add it by hand instead"
166
+ }
167
+ )
168
+ ] })
169
+ ] }),
170
+ !N && !f && !u && /* @__PURE__ */ a("p", { className: "jp-import__hint", children: /* @__PURE__ */ a(
171
+ "button",
172
+ {
173
+ type: "button",
174
+ className: "jp-drawer__link",
175
+ onClick: () => k(!0),
176
+ "data-testid": "import-manual-start",
177
+ children: "Or type a posting in by hand"
178
+ }
179
+ ) }),
180
+ u && /* @__PURE__ */ n("p", { className: "jp-import__done", "data-testid": "import-result", children: [
181
+ u.already_tracked ? `Already in your pipeline as ${u.state}: ` : `Added as ${u.state}: `,
182
+ /* @__PURE__ */ n("button", { type: "button", className: "jp-drawer__link", onClick: () => d(u.job.id), children: [
183
+ u.job.company,
184
+ " — ",
185
+ u.job.title
186
+ ] }),
187
+ !u.created && !u.already_tracked && /* @__PURE__ */ a("span", { className: "jp-muted", children: " (it was already in the feed)" })
188
+ ] })
189
+ ] });
190
+ }
191
+ const U = [
192
+ { state: "interested", label: "Interested" },
193
+ { state: "saved", label: "Saved" },
194
+ { state: "applied", label: "Applied" },
195
+ { state: "interviewing", label: "Interviewing" },
196
+ { state: "offered", label: "Offered" },
197
+ { state: "rejected", label: "Rejected" }
198
+ ], Q = { 1: "High", 3: "Low" };
199
+ function W() {
200
+ const e = /* @__PURE__ */ new Date(), l = (d) => String(d).padStart(2, "0");
201
+ return `${e.getFullYear()}-${l(e.getMonth() + 1)}-${l(e.getDate())}`;
202
+ }
203
+ function x(e) {
204
+ const l = /^\d{4}-\d{2}-\d{2}$/.test(e) ? /* @__PURE__ */ new Date(`${e}T00:00:00`) : new Date(e);
205
+ return Number.isNaN(l.getTime()) ? e : l.toLocaleDateString(void 0, { month: "short", day: "numeric" });
206
+ }
207
+ function z(e, l) {
208
+ const d = e.tracking.priority ?? 2, o = l.tracking.priority ?? 2;
209
+ if (d !== o) return d - o;
210
+ const _ = e.tracking.follow_up_at ?? "9999", c = l.tracking.follow_up_at ?? "9999";
211
+ return _ !== c ? _ < c ? -1 : 1 : e.updated_at < l.updated_at ? 1 : -1;
212
+ }
213
+ function K({ date: e, today: l }) {
214
+ const d = e < l ? "overdue" : e === l ? "today" : "upcoming", o = d === "overdue" ? `Follow up — was ${x(e)}` : d === "today" ? "Follow up today" : `Follow up ${x(e)}`;
215
+ return /* @__PURE__ */ a("span", { className: `jp-pipe-chip jp-pipe-chip--${d}`, "data-testid": "pipe-follow-up", children: o });
216
+ }
217
+ function V({
218
+ item: e,
219
+ today: l,
220
+ onSelect: d,
221
+ onMove: o,
222
+ moving: _
223
+ }) {
224
+ const c = e.tracking.priority, b = c === 1 || c === 3 ? Q[c] : null;
225
+ return /* @__PURE__ */ n(
226
+ "li",
227
+ {
228
+ className: `jp-pipe-card${_ ? " jp-pipe-card--moving" : ""}`,
229
+ draggable: !_,
230
+ onDragStart: (i) => {
231
+ i.dataTransfer.setData("text/plain", e.job_id), i.dataTransfer.effectAllowed = "move";
232
+ },
233
+ "data-testid": "pipe-card",
234
+ "data-job-id": e.job_id,
235
+ children: [
236
+ /* @__PURE__ */ n(
237
+ "div",
238
+ {
239
+ role: "button",
240
+ tabIndex: 0,
241
+ className: "jp-pipe-card__open",
242
+ onClick: () => d(e.job_id),
243
+ onKeyDown: (i) => {
244
+ i.target === i.currentTarget && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), d(e.job_id));
245
+ },
246
+ children: [
247
+ /* @__PURE__ */ n("div", { className: "jp-pipe-card__head", children: [
248
+ /* @__PURE__ */ a("span", { className: "jp-pipe-card__company", children: e.company }),
249
+ b && /* @__PURE__ */ a("span", { className: `jp-pipe-chip jp-pipe-chip--priority-${c}`, children: b })
250
+ ] }),
251
+ /* @__PURE__ */ a("span", { className: "jp-pipe-card__title", children: e.title }),
252
+ /* @__PURE__ */ n("span", { className: "jp-pipe-card__meta", children: [
253
+ e.applied_at ? `Applied ${x(e.applied_at)}` : `Updated ${x(e.updated_at)}`,
254
+ e.location && ` · ${e.location}`
255
+ ] }),
256
+ (e.tracking.follow_up_at ?? e.application_status ?? e.tracking.contact_name) && /* @__PURE__ */ n("div", { className: "jp-pipe-card__chips", children: [
257
+ e.tracking.follow_up_at && /* @__PURE__ */ a(K, { date: e.tracking.follow_up_at, today: l }),
258
+ e.application_status && /* @__PURE__ */ n("span", { className: "jp-pipe-chip jp-pipe-chip--neutral", title: "Apply queue status", children: [
259
+ "Runner: ",
260
+ e.application_status.replace("_", " ")
261
+ ] }),
262
+ e.tracking.contact_name && /* @__PURE__ */ a("span", { className: "jp-pipe-chip jp-pipe-chip--neutral", children: e.tracking.contact_name })
263
+ ] })
264
+ ]
265
+ }
266
+ ),
267
+ /* @__PURE__ */ n(
268
+ "select",
269
+ {
270
+ className: "jp-pipe-card__move",
271
+ "aria-label": `Move ${e.company} — ${e.title}`,
272
+ value: e.state,
273
+ disabled: _,
274
+ onChange: (i) => o(e.job_id, i.target.value),
275
+ children: [
276
+ U.map((i) => /* @__PURE__ */ a("option", { value: i.state, children: i.label }, i.state)),
277
+ /* @__PURE__ */ a("option", { value: "dismissed", children: "Dismiss" })
278
+ ]
279
+ }
280
+ )
281
+ ]
282
+ }
283
+ );
284
+ }
285
+ function te({ auth: e, onSelect: l, reloadKey: d }) {
286
+ const {
287
+ data: o,
288
+ loading: _,
289
+ error: c,
290
+ reload: b
291
+ } = O("pipeline", () => Y(e)), [i, v] = h({}), [u, A] = h(/* @__PURE__ */ new Set()), [N, w] = h(null), [f, k] = h(""), [g, $] = h(null), T = W();
292
+ P(() => {
293
+ d !== 0 && (L("pipeline"), b());
294
+ }, [d]), P(() => v({}), [o]);
295
+ const j = I(() => {
296
+ const t = f.trim().toLowerCase();
297
+ return (o ?? []).map((s) => i[s.job_id] ? { ...s, state: i[s.job_id] } : s).filter((s) => s.state !== "dismissed").filter((s) => !t || s.company.toLowerCase().includes(t) || s.title.toLowerCase().includes(t));
298
+ }, [o, i, f]), r = j.filter((t) => t.tracking.follow_up_at && t.tracking.follow_up_at <= T), y = async (t, s) => {
299
+ const p = j.find((m) => m.job_id === t);
300
+ if (!(!p || p.state === s || u.has(t))) {
301
+ w(null), v((m) => ({ ...m, [t]: s })), A((m) => new Set(m).add(t));
302
+ try {
303
+ await B(t, s, e), L(`job:${t}:`), L("jobs:"), L("pipeline"), b();
304
+ } catch (m) {
305
+ v((C) => {
306
+ const M = { ...C };
307
+ return delete M[t], M;
308
+ }), w(
309
+ `Could not move ${p.company}: ${m instanceof D ? m.message : "request failed"}`
310
+ );
311
+ } finally {
312
+ A((m) => {
313
+ const C = new Set(m);
314
+ return C.delete(t), C;
315
+ });
316
+ }
317
+ }
318
+ }, S = (t) => (s) => {
319
+ s.preventDefault(), $(null);
320
+ const p = s.dataTransfer.getData("text/plain");
321
+ p && y(p, t);
322
+ }, q = c instanceof D && c.status === 403;
323
+ if (_) return /* @__PURE__ */ a("p", { className: "jp-muted", children: "Loading your pipeline…" });
324
+ if (q)
325
+ return /* @__PURE__ */ a("p", { className: "jp-muted", children: "The pipeline is per-account — sign in to see yours." });
326
+ if (c)
327
+ return /* @__PURE__ */ a("p", { className: "jp-error", children: c instanceof D ? c.message : "Failed to load the pipeline" });
328
+ const E = /* @__PURE__ */ a(
329
+ H,
330
+ {
331
+ auth: e,
332
+ onOpen: l,
333
+ onImported: () => {
334
+ L("pipeline"), L("jobs:"), b();
335
+ }
336
+ }
337
+ );
338
+ return (o ?? []).length === 0 ? /* @__PURE__ */ n("div", { className: "jp-pipe", children: [
339
+ E,
340
+ /* @__PURE__ */ a("p", { className: "jp-muted", children: "Nothing in your pipeline yet. Mark a posting interested, save it or apply from the feed, or add one by URL above, and it lands here." })
341
+ ] }) : /* @__PURE__ */ n("div", { className: "jp-pipe", children: [
342
+ E,
343
+ /* @__PURE__ */ n("div", { className: "jp-pipe__toolbar", children: [
344
+ /* @__PURE__ */ a(
345
+ "input",
346
+ {
347
+ type: "search",
348
+ className: "jp-jobs__search",
349
+ placeholder: "Filter by company or title",
350
+ value: f,
351
+ onChange: (t) => k(t.target.value),
352
+ "aria-label": "Filter the pipeline"
353
+ }
354
+ ),
355
+ /* @__PURE__ */ n("span", { className: "jp-pipe__summary", "data-testid": "pipe-summary", children: [
356
+ j.length,
357
+ " in play",
358
+ r.length > 0 && /* @__PURE__ */ n(F, { children: [
359
+ " · ",
360
+ /* @__PURE__ */ n("strong", { children: [
361
+ r.length,
362
+ " follow-up",
363
+ r.length === 1 ? "" : "s",
364
+ " due"
365
+ ] })
366
+ ] })
367
+ ] })
368
+ ] }),
369
+ N && /* @__PURE__ */ a("p", { className: "jp-error", children: N }),
370
+ /* @__PURE__ */ a("div", { className: "jp-pipe__board", children: U.map((t) => {
371
+ const s = j.filter((p) => p.state === t.state).sort(z);
372
+ return /* @__PURE__ */ n(
373
+ "section",
374
+ {
375
+ className: `jp-pipe__col jp-pipe__col--${t.state}${g === t.state ? " jp-pipe__col--drop" : ""}`,
376
+ "aria-label": t.label,
377
+ "data-testid": `pipe-col-${t.state}`,
378
+ onDragOver: (p) => {
379
+ p.preventDefault(), p.dataTransfer.dropEffect = "move", g !== t.state && $(t.state);
380
+ },
381
+ onDragLeave: (p) => {
382
+ p.currentTarget.contains(p.relatedTarget) || $(null);
383
+ },
384
+ onDrop: S(t.state),
385
+ children: [
386
+ /* @__PURE__ */ n("h3", { className: "jp-pipe__col-head", children: [
387
+ /* @__PURE__ */ a("span", { className: `jp-jobcard__state jp-jobcard__state--${t.state}`, children: t.label }),
388
+ /* @__PURE__ */ a("span", { className: "jp-pipe__count", children: s.length })
389
+ ] }),
390
+ /* @__PURE__ */ a("ul", { className: "jp-pipe__cards", children: s.map((p) => /* @__PURE__ */ a(
391
+ V,
392
+ {
393
+ item: p,
394
+ today: T,
395
+ onSelect: l,
396
+ onMove: (m, C) => {
397
+ y(m, C);
398
+ },
399
+ moving: u.has(p.job_id)
400
+ },
401
+ p.job_id
402
+ )) })
403
+ ]
404
+ },
405
+ t.state
406
+ );
407
+ }) })
408
+ ] });
409
+ }
410
+ export {
411
+ U as PIPELINE_COLUMNS,
412
+ te as PipelineBoard
413
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx as a, jsxs as c } from "react/jsx-runtime";
2
2
  import { useState as y, useEffect as R } from "react";
3
- import { u as A, k as F, m as P, J as L, n as M, i as C, o as w, p as D } from "./entry-D7QDbdxu.js";
3
+ import { u as A, k as F, m as P, J as L, n as M, i as C, o as w, p as D } from "./entry-9LEkYNMB.js";
4
4
  const N = (e, n) => e instanceof L ? e.message : n, Y = [
5
5
  { key: "name", label: "Full name" },
6
6
  { key: "email", label: "Email", type: "email" },
@@ -75,10 +75,21 @@ export interface ImportedPosting {
75
75
  /** The caller already tracked it, so its state was left as it was. */
76
76
  already_tracked: boolean;
77
77
  }
78
+ /** A posting typed in by hand, for a page nothing can be read from. */
79
+ export interface ManualPosting {
80
+ title: string;
81
+ company: string;
82
+ location?: string;
83
+ /** Plain text; the server stores it escaped, never as markup. */
84
+ description?: string;
85
+ }
78
86
  /**
79
87
  * POST /jobs/import — read a posting from its URL (the scraper does the
80
88
  * reading) and add it to the pipeline. The server's error messages are
81
89
  * written for the person ("LinkedIn postings can't be imported…").
90
+ *
91
+ * With `manual`, nothing is read: what the person typed is stored instead,
92
+ * and the feed shows it only to people tracking it.
82
93
  */
83
- export declare function importPosting(url: string, state: Exclude<JobStateWrite, 'dismissed'>, auth?: Auth): Promise<ImportedPosting>;
94
+ export declare function importPosting(url: string, state: Exclude<JobStateWrite, 'dismissed'>, auth?: Auth, manual?: ManualPosting): Promise<ImportedPosting>;
84
95
  //# sourceMappingURL=pipeline.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/api/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAElC,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAA;AAE9D,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEhC,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAA;IACzB,kBAAkB;IAClB,YAAY,EAAE,MAAM,GA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E,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;IAClF,iFAAiF;IACjF,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,aAAa,CAAA;IACpB,sEAAsE;IACtE,eAAe,EAAE,OAAO,CAAA;CACzB;AAED,uEAAuE;AACvE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iEAAiE;IACjE,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,CAAC,aAAa,EAAE,WAAW,CAAC,EAC1C,IAAI,CAAC,EAAE,IAAI,EACX,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO,CAAC,eAAe,CAAC,CAO1B"}
@@ -4,6 +4,10 @@ import type { Auth } from '../api/auth';
4
4
  * look. The server reads the posting (Greenhouse, Lever and Ashby through
5
5
  * their APIs; other career sites from their structured data), stores it like
6
6
  * any scraped posting, and adds it to the pipeline.
7
+ *
8
+ * When the page can't be read (no structured data, a login wall, a posting
9
+ * already taken down), the person can type it in instead. The URL and the
10
+ * state they picked carry over; only title and company are required.
7
11
  */
8
12
  export declare function ImportPosting({ auth, onImported, onOpen }: {
9
13
  auth: Auth;
@@ -1 +1 @@
1
- {"version":3,"file":"ImportPosting.d.ts","sourceRoot":"","sources":["../../src/components/ImportPosting.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAWvC;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,UAAU,EACV,MAAM,EACP,EAAE;IACD,IAAI,EAAE,IAAI,CAAA;IACV,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC,2CA8EA"}
1
+ {"version":3,"file":"ImportPosting.d.ts","sourceRoot":"","sources":["../../src/components/ImportPosting.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAkBvC;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,UAAU,EACV,MAAM,EACP,EAAE;IACD,IAAI,EAAE,IAAI,CAAA;IACV,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC,2CAsLA"}
@@ -1 +1 @@
1
- {"version":3,"file":"JobDrawer.d.ts","sourceRoot":"","sources":["../../src/components/JobDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,EASL,KAAK,YAAY,EAGjB,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAiBvC,UAAU,KAAK;IACb,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IAGxB,WAAW,CAAC,EAAE,SAAS,GAAG,IAAI,CAAA;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAA;IAC/D,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,CAAA;IACzF,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC7B,iEA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,2CAkBrD;AAgFD,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,KAAK,EACL,SAAS,EACT,WAAW,EACX,OAAO,EACP,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EACjB,EAAE,KAAK,2CA2hBP"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * A posting's description, cut down to formatting before it is rendered as
3
+ * HTML.
4
+ *
5
+ * Descriptions come from outside: board APIs, and since POST /jobs/import any
6
+ * careers page's JSON-LD, which any friend-tier caller can point at a page
7
+ * they control. The corpus is shared, so markup stored from one import renders
8
+ * in everyone's drawer on hadoku.me. Only formatting survives here: an
9
+ * allowlist of tags, no attributes but an http(s) link's href, and nothing at
10
+ * all from a script, style or embed (their text included).
11
+ *
12
+ * DOMParser builds an inert document: nothing in it runs or loads while it is
13
+ * parsed or walked. No dependency, so the boot bundle stays inside its budget.
14
+ */
15
+ export declare function safeHtml(html: string): string;
16
+ //# sourceMappingURL=safeHtml.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safeHtml.d.ts","sourceRoot":"","sources":["../../src/components/safeHtml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAgGH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM7C"}