@uvalib/web-components 1.12.0 → 1.13.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +82 -3
  3. package/dist/base.css +27 -1
  4. package/dist/components/uvalib-qr/UvalibQr.d.ts +139 -0
  5. package/dist/components/uvalib-qr/UvalibQr.js +530 -0
  6. package/dist/components/uvalib-qr/UvalibQr.js.map +1 -0
  7. package/dist/components/uvalib-qr/uvalib-qr.d.ts +1 -0
  8. package/dist/components/uvalib-qr/uvalib-qr.js +4 -0
  9. package/dist/components/uvalib-qr/uvalib-qr.js.map +1 -0
  10. package/dist/custom-elements.json +834 -2
  11. package/dist/edition-epub.css +56 -0
  12. package/dist/edition.css +61 -0
  13. package/dist/index.d.ts +2 -0
  14. package/dist/index.js +1 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/styles/base.js +27 -1
  17. package/dist/styles/base.js.map +1 -1
  18. package/dist/styles/edition.js +94 -20
  19. package/dist/styles/edition.js.map +1 -1
  20. package/dist-cdn/base.css +27 -1
  21. package/dist-cdn/chunks/{base-D_oPO5cX.js → base-C8PSG8Gv.js} +28 -2
  22. package/dist-cdn/chunks/base-C8PSG8Gv.js.map +1 -0
  23. package/dist-cdn/custom-elements.json +834 -2
  24. package/dist-cdn/edition-epub.css +56 -0
  25. package/dist-cdn/edition.css +61 -0
  26. package/dist-cdn/manifest.json +3 -2
  27. package/dist-cdn/site-page.js +1 -1
  28. package/dist-cdn/site-style.js +1 -1
  29. package/dist-cdn/skills/uvalib-web-components/SKILL.md +21 -7
  30. package/dist-cdn/skills/uvalib-web-components/reference/components.md +47 -0
  31. package/dist-cdn/uvalib-qr.js +501 -0
  32. package/dist-cdn/uvalib-qr.js.map +1 -0
  33. package/package.json +6 -1
  34. package/skills/uvalib-web-components/SKILL.md +21 -7
  35. package/skills/uvalib-web-components/reference/components.md +47 -0
  36. package/dist-cdn/chunks/base-D_oPO5cX.js.map +0 -1
@@ -0,0 +1,501 @@
1
+ import { a as e, d as t, f as n, l as r, m as i, n as a, o, p as s, r as c, t as l } from "./chunks/UvalibElement-pGONDAwB.js";
2
+ import { a as u } from "./chunks/analytics-DTTihuBD.js";
3
+ // node_modules/.pnpm/lean-qr@2.7.4/node_modules/lean-qr/nano.mjs
4
+ var d = [
5
+ .2,
6
+ 3 / 8,
7
+ 5 / 9,
8
+ 2 / 3
9
+ ], f = (e, t) => (n) => {
10
+ let r = 4 * e + n - 4, i = "*-04-39?2$%%$%%'$%''%'''%')(%'))%(++'(++'(+.'+-.',/3',33)-/5)-43).36)058*18<+37<+4:<,4:E,5<A-7>C/8@F/:EH/<EK0=FM1?IP2@KS3BNV4DPY5FS\\6HV_6IXb7K[e8N^i9Pam;Rdp<Tgt".charCodeAt(r) - 35, a = r > 8 ? i : 1, o = t / a | 0, s = t % a, c = a - s, l = r > 8 ? o * d[n] + (e > 5) & -2 : i, u = o - l;
11
+ return {
12
+ t: c * u + s * u + s,
13
+ o: [[c, u], [s, u + 1]],
14
+ l
15
+ };
16
+ }, p = {
17
+ L: 0,
18
+ M: 1,
19
+ Q: 2,
20
+ H: 3
21
+ }, m = (e) => new Uint8Array(e), h = (e) => {
22
+ let t = /* @__PURE__ */ Error(`lean-qr error ${e}`);
23
+ throw t.code = e, t;
24
+ }, g = (e, t = e * e, n = m(t)) => ({
25
+ size: e,
26
+ i: n,
27
+ get: (t, r) => t >= 0 && t < e && !!(1 & n[r * e + t]),
28
+ u(t, { on: n = [
29
+ 0,
30
+ 0,
31
+ 0
32
+ ], off: r = [
33
+ 0,
34
+ 0,
35
+ 0,
36
+ 0
37
+ ], pad: i = 4, padX: a = i, padY: o = i } = {}) {
38
+ let s = e + 2 * a, c = e + 2 * o, l = t.createImageData(s, c), u = new Uint32Array(l.data.buffer);
39
+ l.data.set([...n, 255]);
40
+ let d = u[0];
41
+ l.data.set([...r, 255]);
42
+ let f = u[0];
43
+ for (let e = 0; e < c; ++e) for (let t = 0; t < s; ++t) u[e * s + t] = this.get(t - a, e - o) ? d : f;
44
+ return l;
45
+ },
46
+ toCanvas(e, t) {
47
+ let n = e.getContext("2d"), r = this.u(n, t);
48
+ e.width = r.width, e.height = r.height, n.putImageData(r, 0, 0);
49
+ }
50
+ }), _ = [
51
+ (e, t) => 1 & (e ^ t),
52
+ (e, t) => 1 & t,
53
+ (e) => e % 3,
54
+ (e, t) => (e + t) % 3,
55
+ (e, t) => 1 & (e / 3 ^ t >> 1),
56
+ (e, t) => (e & t & 1) + e * t % 3,
57
+ (e, t) => (e & t) + e * t % 3 & 1,
58
+ (e, t) => (e ^ t) + e * t % 3 & 1
59
+ ], v = m(511);
60
+ for (let e = 0, t = 1; e < 255; t = 2 * t ^ 285 * (t > 127)) v[v[t + 255] = e++] = t;
61
+ var y = (e) => v[e % 255], b = (e) => v[e + 255], x = (e, t) => {
62
+ let n = m(e.length + t.length - 1);
63
+ for (let r = 0; r < e.length; ++r) for (let i = 0; i < t.length; ++i) n[r + i] ^= y(e[r] + t[i]);
64
+ return n.map(b);
65
+ }, S = (e, t) => {
66
+ let n = m(e.length + t.length - 1);
67
+ n.set(e, 0);
68
+ for (let r = 0; r < e.length; ++r) if (n[r]) {
69
+ let e = b(n[r]);
70
+ for (let i = 0; i < t.length; ++i) n[r + i] ^= y(t[i] + e);
71
+ }
72
+ return n.slice(e.length);
73
+ }, C = [[0], [0, 0]];
74
+ for (let e = 1; e < 30; ++e) C.push(x(C[e], [0, e]));
75
+ var w = (e, t) => {
76
+ let n = [[], []], r = 0, i = 0;
77
+ for (let [a, o] of t.o) for (let s = 0; s < a; ++s, r += o) {
78
+ let a = e.slice(r, r + o);
79
+ n[0].push(a), n[1].push(S(a, C[t.l])), i += o + t.l;
80
+ }
81
+ let a = m(i);
82
+ i = 0;
83
+ for (let e of n) for (let t = 0, n = -1; n < i; ++t) {
84
+ n = i;
85
+ for (let n of e) t < n.length && (a[i++] = n[t]);
86
+ }
87
+ return a;
88
+ }, T = (e, t, n) => {
89
+ let r = e <<= n;
90
+ for (let e = 134217728; e >>= 1;) r & e && (r ^= t * (e >> n));
91
+ return r | e;
92
+ }, E = ({ size: e, i: t }, n) => {
93
+ let r = (n, r, i, a) => {
94
+ for (; i-- > 0; n += e) t.fill(a, n, n + r);
95
+ }, i = (t, n, i) => {
96
+ for (let a = 0; a++ < 3; i -= 2) r(n * e + t - (i >> 1) * (e + 1), i, i, 2 | a);
97
+ }, a = 2 * ((e - 13) / (1 + (n / 7 | 0)) / 2 + .75 | 0);
98
+ if (n > 1) for (let t = e - 7; t > 8; t -= a) {
99
+ for (let e = t; e > 8; e -= a) i(t, e, 5);
100
+ t < e - 7 && i(t, 6, 5);
101
+ }
102
+ if (n > 6) for (let r = T(n, 7973, 12), i = 1; i < 7; ++i) for (let n = 12; n-- > 9; r >>= 1) t[i * e - n] = 2 | 1 & r;
103
+ r(7, 2, 9, 2), r(e - 8, 8, 9, 2);
104
+ for (let n = 0; n < e; ++n) t[6 * e + n] = 3 ^ 1 & n;
105
+ i(3, 3, 7), i(e - 4, 3, 7);
106
+ for (let n = 0; n < e; ++n) for (let r = n; r < e; ++r) t[r * e + n] = t[n * e + r];
107
+ t[(e - 8) * e + 8] = 3;
108
+ }, D = ({ size: e, i: t }) => {
109
+ let n = [];
110
+ for (let r = e - 2, i = e, a = -1; r >= 0; r -= 2) {
111
+ for (r === 5 && (r = 4); i += a, i !== -1 && i !== e;) {
112
+ let a = i * e + r;
113
+ t[a + 1] || n.push(a + 1), t[a] || n.push(a);
114
+ }
115
+ a *= -1;
116
+ }
117
+ return n;
118
+ }, O = ({ i: e }, t, n) => t.forEach((t, r) => e[t] = n[r >> 3] >> (7 & ~r) & 1), k = ({ size: e, i: t }, n, r, i) => {
119
+ for (let r = 0; r < e; ++r) for (let i = 0; i < e; ++i) {
120
+ let a = r * e + i;
121
+ t[a] ^= !(n(i, r) || 2 & t[a]);
122
+ }
123
+ let a = 21522 ^ T((1 ^ i) << 3 | r, 1335, 10);
124
+ for (let n = 0; n++ < 8; a >>= 1) t[(n - (n < 7)) * e + 8] = 1 & a, t[9 * e - n] = 1 & a;
125
+ for (let n = 8; --n, a; a >>= 1) t[8 * e + n - (n < 7)] = 1 & a, t[(e - n) * e + 8] = 1 & a;
126
+ }, A = ({ size: e, i: t }, n = 0, r = 0) => {
127
+ for (let i = 0; i < e; ++i) {
128
+ for (let a = 0; a < 2; ++a) for (let o, s = 0, c = 0, l = 2; s < e; ++s) {
129
+ let u = 1 & t[a ? i * e + s : s * e + i];
130
+ r += u, c = (c >> 1 | 2098176) & (3047517 ^ u - 1), 2049 & c && (n += 40), u ^ l && (o = 0), l = u, n += ++o === 5 ? 3 : o > 5;
131
+ }
132
+ if (i) for (let r = e + i, a = 5 * t[i - 1] ^ t[i]; r < e * e; r += e) {
133
+ let e = 5 * t[r - 1] ^ t[r];
134
+ n += 3 * !(1 & (a | e) | 4 & (a ^ e)), a = e;
135
+ }
136
+ }
137
+ return n + 10 * (10 * Math.abs(r / (e * e) - 1) | 0);
138
+ }, j = [], ee = (e = h(1), { minCorrectionLevel: t = 0, minVersion: n = 1 } = {}) => {
139
+ typeof e != "string" && h(5), e = new TextEncoder().encode(e);
140
+ let r = m(2957);
141
+ r.set([
142
+ 113,
143
+ 164,
144
+ e.length >> 8
145
+ ]);
146
+ for (let i = n; i < 41; ++i) {
147
+ let n = j[i];
148
+ n || (j[i] = n = g(4 * i + 17), E(n, i), n.p = D(n));
149
+ let a = f(i, n.p.length >> 3)(t);
150
+ if (a.t >= 3 + (i > 9) + e.length) {
151
+ let o = i > 9 ? 3 : 2;
152
+ for (r[o++] = e.length, r.set(e, o), o += e.length - 1; o < 2954; r.set([236, 17], o += 2));
153
+ let s = g(n.size, n.i);
154
+ return O(s, n.p, w(r, a)), _.map((e, n) => {
155
+ let r = g(s.size, s.i);
156
+ return k(r, e, n, t), r.s = A(r), r;
157
+ }).sort((e, t) => e.s - t.s)[0];
158
+ }
159
+ }
160
+ h(4);
161
+ }, M = (e) => {
162
+ let t = [], n = "";
163
+ for (let r = 0; r <= e.size; ++r) for (let i = 0; i <= e.size; ++i) {
164
+ let a = e.get(i, r), o = i << 8 | r, s = e.get(i - 1, r) ^ a && o + 1, c = e.get(i, r - 1) ^ a && o + 256;
165
+ if (s || c) {
166
+ a || ([s, c] = [c, s]);
167
+ let e = t[s || o] ||= [], r = t[c || o];
168
+ s && e.push(o), c && e.push(c), e === r ? n += `M${e.map((e) => `${e >> 8} ${255 & e}`).join("L")}Z` : (r && e.push(...r), t[e[e.length - 1]] = e);
169
+ }
170
+ }
171
+ return n;
172
+ }, N = "uvalib-qr", P = "http://www.w3.org/2000/svg", F = "#232d4b", I = "#ffffff", L = "#000000", R = [
173
+ "L",
174
+ "M",
175
+ "Q",
176
+ "H"
177
+ ], z = .1, B = /* @__PURE__ */ new Set([
178
+ "http:",
179
+ "https:",
180
+ "mailto:",
181
+ "tel:"
182
+ ]), V = (e) => (e ?? "").replace(/\s+/g, " ").trim();
183
+ function H(e) {
184
+ let t;
185
+ try {
186
+ t = new URL(e);
187
+ } catch {
188
+ return null;
189
+ }
190
+ return t.protocol === "mailto:" || t.protocol === "tel:" ? t.pathname || null : t.protocol !== "http:" && t.protocol !== "https:" ? null : t.hostname.replace(/^www\./, "") + decodeURI(t.pathname).replace(/\/+$/, "");
191
+ }
192
+ var U = (e, t, n, r) => {
193
+ let i = n - 2 * r, a = (e, t) => `a${r} ${r} 0 0 1 ${e} ${t}`;
194
+ return `M${e + r} ${t}h${i}${a(r, r)}v${i}${a(-r, r)}h${-i}${a(-r, -r)}v${-i}${a(r, -r)}z`;
195
+ }, W = (e) => [
196
+ [0, 0],
197
+ [e - 7, 0],
198
+ [0, e - 7]
199
+ ].map(([e, t]) => U(e, t, 7, 2) + U(e + 1, t + 1, 5, 1) + U(e + 2, t + 2, 3, 1)).join(""), G = (e, t, n) => t < 7 && n < 7 || t >= e - 7 && n < 7 || t < 7 && n >= e - 7;
200
+ function K(e, t) {
201
+ let n = e.size, r = e.clear, i = (e, t) => !!r && e >= r.x && e < r.x + r.size && t >= r.y && t < r.y + r.size, a = M({
202
+ size: n,
203
+ get: (r, a) => r >= 0 && a >= 0 && r < n && a < n && !i(r, a) && (t || !G(n, r, a)) && e.get(r, a)
204
+ });
205
+ return t ? a : a + W(n);
206
+ }
207
+ function q(e, t) {
208
+ let n = Math.max(1, Math.round(e * t / 100));
209
+ for (n % 2 == 0 && (n += 1); n > 1 && n * n > .1 * e * e;) n -= 2;
210
+ return {
211
+ side: n,
212
+ limited: t > 100 * Math.sqrt(z)
213
+ };
214
+ }
215
+ var J = (e) => e.split(/(?<=[/.])/).map((e, t) => t ? r`<wbr />${e}` : e), Y = (e) => e.replace(/[&<>"]/g, (e) => ({
216
+ "&": "&amp;",
217
+ "<": "&lt;",
218
+ ">": "&gt;",
219
+ "\"": "&quot;"
220
+ })[e] ?? e), X = (e) => `
221
+ ${e} {
222
+ display: block;
223
+ inline-size: var(--uvalib-qr-size, 10rem);
224
+ max-inline-size: 100%;
225
+ }
226
+ ${e} .qr-tile { box-sizing: border-box; aspect-ratio: 1; background: #fff; }
227
+ ${e} .qr-svg { display: block; inline-size: 100%; block-size: 100%; }
228
+ `, Z = s(X(":host")), Q = s("var(--uva-color-link, var(--uva-brand-blue, #232d4b))"), te = s("var(--uva-color-link-hover, var(--uva-blue-alt-A, #005679))"), ne = s("var(--uva-color-focus, var(--uva-brand-orange, #e57200))"), $ = class extends l {
229
+ constructor(...e) {
230
+ super(...e), this.value = "", this.label = "", this.size = "", this.errorCorrection = "", this.quietZone = 4, this.variant = "", this.showLink = !1, this.linkLabel = "", this.logoSrc = "", this.logoAlt = "", this.logoSize = 20, this._code = null, this._path = "", this.warned = /* @__PURE__ */ new Set(), this.onLinkClick = () => {
231
+ u(this, [N, "link-click"]);
232
+ };
233
+ }
234
+ static {
235
+ this.styles = [Z, n`
236
+ .qr-tile {
237
+ overflow: hidden;
238
+ border: 3px solid var(--uvalib-qr-frame, var(--uva-brand-orange, #e57200));
239
+ border-radius: 8px;
240
+ /* The code is an image: it keeps its colours in forced colors (dark on light). */
241
+ forced-color-adjust: none;
242
+ }
243
+ :host([variant='plain']) .qr-tile {
244
+ border: 0;
245
+ border-radius: 0;
246
+ }
247
+ .qr-modules {
248
+ fill: var(--uvalib-qr-color, var(--uva-brand-blue, #232d4b));
249
+ }
250
+ :host([variant='plain']) .qr-modules {
251
+ fill: #000;
252
+ }
253
+ .qr-tile.invalid {
254
+ display: grid;
255
+ place-items: center;
256
+ padding: 0.5rem;
257
+ border: 2px dashed #6b7280;
258
+ border-radius: 8px;
259
+ color: #2b2b2b;
260
+ font-size: 0.875rem;
261
+ line-height: 1.4;
262
+ text-align: center;
263
+ }
264
+ .qr-fallback {
265
+ margin: 0;
266
+ }
267
+ .qr-link {
268
+ margin: 0.5rem 0 0;
269
+ font-size: 0.875rem;
270
+ line-height: 1.7;
271
+ text-align: center;
272
+ overflow-wrap: break-word;
273
+ }
274
+ .qr-link a {
275
+ color: ${Q};
276
+ text-decoration: underline;
277
+ text-underline-offset: 0.15em;
278
+ }
279
+ .qr-link a:hover {
280
+ color: ${te};
281
+ text-decoration-thickness: 2px;
282
+ }
283
+ .qr-link a:focus-visible {
284
+ outline: 3px solid ${ne};
285
+ outline-offset: 2px;
286
+ border-radius: 2px;
287
+ }
288
+ @media (forced-colors: active) {
289
+ .qr-tile {
290
+ /* Kept as an image, but outlined so the tile's edge shows on any theme. */
291
+ outline: 2px solid CanvasText;
292
+ }
293
+ .qr-tile.invalid {
294
+ forced-color-adjust: auto;
295
+ border-color: CanvasText;
296
+ }
297
+ .qr-link a {
298
+ color: LinkText;
299
+ }
300
+ }
301
+ @media print {
302
+ .qr-tile {
303
+ border-color: transparent;
304
+ print-color-adjust: exact;
305
+ }
306
+ .qr-link a {
307
+ color: #000;
308
+ }
309
+ }
310
+ `];
311
+ }
312
+ get code() {
313
+ return this._code;
314
+ }
315
+ warn(e) {
316
+ this.warned.has(e) || (this.warned.add(e), console.warn(`${N}: ${e}`));
317
+ }
318
+ get hasLogo() {
319
+ return !!V(this.logoSrc);
320
+ }
321
+ get quiet() {
322
+ let e = Math.round(Number(this.quietZone));
323
+ return Number.isFinite(e) ? Math.min(16, Math.max(0, e)) : 4;
324
+ }
325
+ get plain() {
326
+ return this.variant === "plain";
327
+ }
328
+ level() {
329
+ if (this.hasLogo) return "H";
330
+ let e = V(this.errorCorrection).toUpperCase();
331
+ return e ? R.includes(e) ? e : (this.warn(`error-correction="${this.errorCorrection}" is not L, M, Q or H; using M.`), "M") : "M";
332
+ }
333
+ encode() {
334
+ this._code = null, this._path = "";
335
+ let e = this.value ?? "";
336
+ if (!e) {
337
+ this.warn("no value to encode.");
338
+ return;
339
+ }
340
+ let t = this.level(), n;
341
+ try {
342
+ n = ee(e, { minCorrectionLevel: p[t] });
343
+ } catch {
344
+ this.warn(`the value (${e.length} characters) is too long for a QR code.`);
345
+ return;
346
+ }
347
+ let r = n.size, i = null;
348
+ if (this.hasLogo) {
349
+ let e = Number(this.logoSize), { side: t, limited: n } = q(r, Number.isFinite(e) && e > 0 ? e : 20);
350
+ n && this.warn(`logo-size="${this.logoSize}" is too big to scan reliably; the logo is limited to ${Math.round(100 * t / r)}% of the side.`);
351
+ let a = (r - t) / 2;
352
+ i = {
353
+ x: a,
354
+ y: a,
355
+ size: t
356
+ };
357
+ }
358
+ this._code = {
359
+ size: r,
360
+ level: t,
361
+ get: (e, t) => n.get(e, t),
362
+ clear: i
363
+ }, this._path = K(this._code, this.plain);
364
+ }
365
+ willUpdate(e) {
366
+ (e.has("value") || e.has("errorCorrection") || e.has("logoSrc") || e.has("logoSize") || e.has("variant") || !this.hasUpdated) && this.encode(), e.has("size") && this.applySize();
367
+ }
368
+ applySize() {
369
+ let e = V(this.size), t = /^\d+(\.\d+)?$/.test(e) ? `${e}px` : e, n = !!e && CSS.supports("width", t);
370
+ e && !n && this.warn(`size="${this.size}" is not a number of pixels or a CSS length.`), n ? (this.ownSize ??= this.style.getPropertyValue("--uvalib-qr-size"), this.style.setProperty("--uvalib-qr-size", t)) : this.ownSize !== void 0 && (this.ownSize ? this.style.setProperty("--uvalib-qr-size", this.ownSize) : this.style.removeProperty("--uvalib-qr-size"), this.ownSize = void 0);
371
+ }
372
+ createRenderRoot() {
373
+ let e = super.createRenderRoot();
374
+ if (e instanceof ShadowRoot && this.noStyle) {
375
+ let t = Z.styleSheet;
376
+ t && (e.adoptedStyleSheets = [t]);
377
+ }
378
+ return e;
379
+ }
380
+ connectedCallback() {
381
+ if (super.connectedCallback(), this.lightDom && this.noStyle) {
382
+ let e = this.getRootNode();
383
+ c(`${N}::structure`, s(X(N)), {
384
+ root: e instanceof ShadowRoot || e instanceof Document ? e : void 0,
385
+ scope: !1
386
+ });
387
+ }
388
+ }
389
+ get short() {
390
+ return H(V(this.value));
391
+ }
392
+ get accessibleName() {
393
+ let e = V(this.label);
394
+ if (!e) {
395
+ let t = this.short, n = V(this.value);
396
+ e = t ? `QR code for ${t}` : n.length <= 60 ? `QR code for “${n}”` : `QR code for “${n.slice(0, 57)}…”`;
397
+ }
398
+ let t = V(this.logoAlt);
399
+ return this.hasLogo && t ? `${e} (${t})` : e;
400
+ }
401
+ get href() {
402
+ let e = V(this.value);
403
+ try {
404
+ return B.has(new URL(e).protocol) ? e : null;
405
+ } catch {
406
+ return null;
407
+ }
408
+ }
409
+ colors() {
410
+ let e = this.renderRoot.querySelector?.(".qr-modules"), t = e ? getComputedStyle(e).fill : "";
411
+ return {
412
+ on: t && t !== "none" && !t.startsWith("url") ? t : this.plain ? L : F,
413
+ off: I
414
+ };
415
+ }
416
+ toSvgString({ scale: e = 10 } = {}) {
417
+ let t = this._code;
418
+ if (!t) return "";
419
+ let n = this.quiet, r = t.size + 2 * n, i = r * (e > 0 ? e : 10), { on: a, off: o } = this.colors();
420
+ return `<svg xmlns="${P}" viewBox="${-n} ${-n} ${r} ${r}" width="${i}" height="${i}" role="img"><title>${Y(this.accessibleName)}</title><rect x="${-n}" y="${-n}" width="${r}" height="${r}" fill="${Y(o)}"/><path fill="${Y(a)}" fill-rule="evenodd" d="${this._path}"/>` + this.logoMarkup() + "</svg>";
421
+ }
422
+ toDataURL(e) {
423
+ let t = this.toSvgString(e);
424
+ return t ? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}` : "";
425
+ }
426
+ download(e = "qr-code.svg") {
427
+ let t = this.toSvgString();
428
+ if (!t) return;
429
+ let n = URL.createObjectURL(new Blob([t], { type: "image/svg+xml" })), r = this.ownerDocument.createElement("a");
430
+ r.href = n, r.download = e, r.hidden = !0, this.ownerDocument.body.append(r), r.click(), r.remove(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
431
+ }
432
+ logoBox() {
433
+ let e = this._code?.clear;
434
+ return e && this.hasLogo ? {
435
+ x: e.x + .5,
436
+ y: e.y + .5,
437
+ size: e.size - 1
438
+ } : null;
439
+ }
440
+ logoMarkup() {
441
+ let e = this.logoBox();
442
+ return e ? `<image href="${Y(V(this.logoSrc))}" x="${e.x}" y="${e.y}" width="${e.size}" height="${e.size}" preserveAspectRatio="xMidYMid meet"/>` : "";
443
+ }
444
+ render() {
445
+ let e = this._code, n = this.href, i = (this.showLink || V(this.linkLabel)) && n ? r`<p class="qr-link">
446
+ <a href=${n} part="link" @click=${this.onLinkClick}
447
+ >${V(this.linkLabel) || J(this.short || n)}</a
448
+ >
449
+ </p>` : o;
450
+ if (!e) return r`<div class="qr-tile invalid" part="tile">
451
+ <p class="qr-fallback" part="fallback">QR code unavailable</p>
452
+ </div>
453
+ ${i}`;
454
+ let a = this.quiet, s = e.size + 2 * a, c = this.logoBox(), l = this.plain;
455
+ return r`<div class="qr-tile" part="tile">
456
+ <svg
457
+ class="qr-svg"
458
+ part="svg"
459
+ role="img"
460
+ viewBox="${-a} ${-a} ${s} ${s}"
461
+ width="100%"
462
+ height="100%"
463
+ preserveAspectRatio="xMidYMid meet"
464
+ >
465
+ <title>${this.accessibleName}</title>
466
+ ${t`<rect x=${-a} y=${-a} width=${s} height=${s} fill=${I} />
467
+ <path class="qr-modules" fill=${l ? L : F} fill-rule="evenodd" d=${this._path} />
468
+ ${c ? t`<image href=${V(this.logoSrc)} x=${c.x} y=${c.y} width=${c.size} height=${c.size} preserveAspectRatio="xMidYMid meet" />` : o}`}
469
+ </svg>
470
+ </div>
471
+ ${i}`;
472
+ }
473
+ };
474
+ // src/components/uvalib-qr/uvalib-qr.ts
475
+ a([e({ type: String })], $.prototype, "value", void 0), a([e({ type: String })], $.prototype, "label", void 0), a([e({ type: String })], $.prototype, "size", void 0), a([e({
476
+ type: String,
477
+ attribute: "error-correction"
478
+ })], $.prototype, "errorCorrection", void 0), a([e({
479
+ type: Number,
480
+ attribute: "quiet-zone"
481
+ })], $.prototype, "quietZone", void 0), a([e({
482
+ type: String,
483
+ reflect: !0
484
+ })], $.prototype, "variant", void 0), a([e({
485
+ type: Boolean,
486
+ attribute: "show-link"
487
+ })], $.prototype, "showLink", void 0), a([e({
488
+ type: String,
489
+ attribute: "link-label"
490
+ })], $.prototype, "linkLabel", void 0), a([e({
491
+ type: String,
492
+ attribute: "logo-src"
493
+ })], $.prototype, "logoSrc", void 0), a([e({
494
+ type: String,
495
+ attribute: "logo-alt"
496
+ })], $.prototype, "logoAlt", void 0), a([e({
497
+ type: Number,
498
+ attribute: "logo-size"
499
+ })], $.prototype, "logoSize", void 0), i("uvalib-qr", $);
500
+
501
+ //# sourceMappingURL=uvalib-qr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uvalib-qr.js","names":["o","toSvgPath","unsafeCSS","generate","correction","nothing","_decorate","property","n$1","w$1","i$1","b","define","__decorate","r$1","installLightDomStyles","UvalibElement","trackEvent","t","o$1","n","o","e","f","s","l","r","c","a","i","d","u","_","p","z","g","w","y","E","h","m","TAG","SVG_NS","NAVY","WHITE","BLACK","LEVELS","QR_LOGO_MAX_AREA","SAFE_SCHEMES","squash","shortUrl","url","value","rounded","arc","dx","dy","x","roundedEyes","inEye","qrPath","code","inClear","modules","plain","clearSide","percent","breakable","text","part","esc","ch","structuralRules","host","shadowStructure","LINK","LINK_HOVER","FOCUS","UvalibQr","_args","message","q","asked","level","bitmap","clear","limited","side","at","changed","raw","length","valid","root","sheet","node","name","short","alt","path","fill","px","scale","off","on","source","options","filename","box","href","link","A"],"sources":["../node_modules/.pnpm/lean-qr@2.7.4/node_modules/lean-qr/nano.mjs","../node_modules/.pnpm/lean-qr@2.7.4/node_modules/lean-qr/extras/svg.mjs","../src/components/uvalib-qr/UvalibQr.ts","../src/components/uvalib-qr/uvalib-qr.ts"],"sourcesContent":["const t=[.2,3/8,5/9,2/3],o=(o,r)=>e=>{const n=4*o+e-4,f=\"*-04-39?2$%%$%%'$%''%'''%')(%'))%(++'(++'(+.'+-.',/3',33)-/5)-43).36)058*18<+37<+4:<,4:E,5<A-7>C/8@F/:EH/<EK0=FM1?IP2@KS3BNV4DPY5FS\\\\6HV_6IXb7K[e8N^i9Pam;Rdp<Tgt\".charCodeAt(n)-35,s=n>8?f:1,l=r/s|0,c=r%s,a=s-c,i=n>8?l*t[e]+(o>5)&-2:f,d=l-i;return{t:a*d+c*d+c,o:[[a,d],[c,d+1]],l:i}},r={L:0,M:1,Q:2,H:3},e=t=>new Uint8Array(t),n=t=>{const o=new Error(`lean-qr error ${t}`);throw o.code=t,o},f=(t,o=t*t,r=e(o))=>({size:t,i:r,get:(o,e)=>o>=0&&o<t&&!!(1&r[e*t+o]),u(o,{on:r=[0,0,0],off:e=[0,0,0,0],pad:n=4,padX:f=n,padY:s=n}={}){const l=t+2*f,c=t+2*s,a=o.createImageData(l,c),i=new Uint32Array(a.data.buffer);a.data.set([...r,255]);const d=i[0];a.data.set([...e,255]);const u=i[0];for(let t=0;t<c;++t)for(let o=0;o<l;++o)i[t*l+o]=this.get(o-f,t-s)?d:u;return a},toCanvas(t,o){const r=t.getContext(\"2d\"),e=this.u(r,o);t.width=e.width,t.height=e.height,r.putImageData(e,0,0)}}),s=[(t,o)=>1&(t^o),(t,o)=>1&o,t=>t%3,(t,o)=>(t+o)%3,(t,o)=>1&(t/3^o>>1),(t,o)=>(t&o&1)+t*o%3,(t,o)=>(t&o)+t*o%3&1,(t,o)=>(t^o)+t*o%3&1],l=e(511);for(let t=0,o=1;t<255;o=2*o^285*(o>127))l[l[o+255]=t++]=o;const c=t=>l[t%255],a=t=>l[t+255],i=(t,o)=>{const r=e(t.length+o.length-1);for(let e=0;e<t.length;++e)for(let n=0;n<o.length;++n)r[e+n]^=c(t[e]+o[n]);return r.map(a)},d=(t,o)=>{const r=e(t.length+o.length-1);r.set(t,0);for(let e=0;e<t.length;++e)if(r[e]){const t=a(r[e]);for(let n=0;n<o.length;++n)r[e+n]^=c(o[n]+t)}return r.slice(t.length)},u=[[0],[0,0]];for(let t=1;t<30;++t)u.push(i(u[t],[0,t]));const _=(t,o)=>{const r=[[],[]];let n=0,f=0;for(const[e,s]of o.o)for(let l=0;l<e;++l,n+=s){const e=t.slice(n,n+s);r[0].push(e),r[1].push(d(e,u[o.l])),f+=s+o.l}const s=e(f);f=0;for(const t of r)for(let o=0,r=-1;r<f;++o){r=f;for(const r of t)o<r.length&&(s[f++]=r[o])}return s},p=(t,o,r)=>{let e=t<<=r;for(let t=134217728;t>>=1;)e&t&&(e^=o*(t>>r));return e|t},z=({size:t,i:o},r)=>{const e=(r,e,n,f)=>{for(;n-- >0;r+=t)o.fill(f,r,r+e)},n=(o,r,n)=>{for(let f=0;f++<3;n-=2)e(r*t+o-(n>>1)*(t+1),n,n,2|f)},f=2*((t-13)/(1+(r/7|0))/2+.75|0);if(r>1)for(let o=t-7;o>8;o-=f){for(let t=o;t>8;t-=f)n(o,t,5);o<t-7&&n(o,6,5)}if(r>6)for(let e=p(r,7973,12),n=1;n<7;++n)for(let r=12;r-- >9;e>>=1)o[n*t-r]=2|1&e;e(7,2,9,2),e(t-8,8,9,2);for(let r=0;r<t;++r)o[6*t+r]=3^1&r;n(3,3,7),n(t-4,3,7);for(let r=0;r<t;++r)for(let e=r;e<t;++e)o[e*t+r]=o[r*t+e];o[(t-8)*t+8]=3},g=({size:t,i:o})=>{const r=[];for(let e=t-2,n=t,f=-1;e>=0;e-=2){for(5===e&&(e=4);n+=f,-1!==n&&n!==t;){const f=n*t+e;o[f+1]||r.push(f+1),o[f]||r.push(f)}f*=-1}return r},w=({i:t},o,r)=>o.forEach((o,e)=>t[o]=r[e>>3]>>(7&~e)&1),y=({size:t,i:o},r,e,n)=>{for(let e=0;e<t;++e)for(let n=0;n<t;++n){const f=e*t+n;o[f]^=!(r(n,e)||2&o[f])}let f=21522^p((1^n)<<3|e,1335,10);for(let r=0;r++<8;f>>=1)o[(r-(r<7))*t+8]=1&f,o[9*t-r]=1&f;for(let r=8;--r,f;f>>=1)o[8*t+r-(r<7)]=1&f,o[(t-r)*t+8]=1&f},E=({size:t,i:o},r=0,e=0)=>{for(let n=0;n<t;++n){for(let f=0;f<2;++f)for(let s,l=0,c=0,a=2;l<t;++l){const i=1&o[f?n*t+l:l*t+n];e+=i,c=(c>>1|2098176)&(3047517^i-1),2049&c&&(r+=40),i^a&&(s=0),a=i,r+=5===++s?3:s>5}if(n)for(let e=t+n,f=5*o[n-1]^o[n];e<t*t;e+=t){const t=5*o[e-1]^o[e];r+=3*!(1&(f|t)|4&(f^t)),f=t}}return r+10*(10*Math.abs(e/(t*t)-1)|0)},h=[],m=(t=n(1),{minCorrectionLevel:r=0,minVersion:l=1}={})=>{\"string\"!=typeof t&&n(5),t=(new TextEncoder).encode(t);const c=e(2957);c.set([113,164,t.length>>8]);for(let e=l;e<41;++e){let n=h[e];n||(h[e]=n=f(4*e+17),z(n,e),n.p=g(n));const l=o(e,n.p.length>>3)(r);if(l.t>=3+(e>9)+t.length){let o=e>9?3:2;for(c[o++]=t.length,c.set(t,o),o+=t.length-1;o<2954;c.set([236,17],o+=2));const a=f(n.size,n.i);return w(a,n.p,_(c,l)),s.map((t,o)=>{const e=f(a.size,a.i);return y(e,t,o,r),e.s=E(e),e}).sort((t,o)=>t.s-o.s)[0]}}n(4)};export{r as correction,m as generate};\n","const t=\"http://www.w3.org/2000/svg\",e=(e,i,o,n=[],s=e.createElementNS(t,i))=>(Object.entries(o).map(([t,e])=>s.setAttribute(t,e)),s.replaceChildren(...n),s),i=(t,e,i,o=[])=>[`<${e}`,...Object.entries(i).map(([t,e])=>` ${t}=\"${`${e}`.replace(/[^ -~]|[\"&]/g,\"\")}\"`),\">\",...o,`</${e}>`].join(\"\"),o=t=>{const e=[];let i=\"\";for(let o=0;o<=t.size;++o)for(let n=0;n<=t.size;++n){const s=t.get(n,o),l=n<<8|o;let r=t.get(n-1,o)^s&&l+1,a=t.get(n,o-1)^s&&l+256;if(r||a){s||([r,a]=[a,r]);const t=e[r||l]||=[],o=e[a||l];r&&t.push(l),a&&t.push(a),t===o?i+=`M${t.map(t=>`${t>>8} ${255&t}`).join(\"L\")}Z`:(o&&t.push(...o),e[t[t.length-1]]=t)}}return i},n=(e,{on:i=\"black\",off:n,pad:s=4,padX:l=s,padY:r=s,width:a,height:c,scale:g=1},h,$,d)=>{const p=e.size+2*l,w=e.size+2*r;return h($,\"svg\",{xmlns:t,version:\"1.1\",viewBox:`${-l} ${-r} ${p} ${w}`,width:a??p*g,height:c??w*g,\"shape-rendering\":\"crispedges\"},[n?h($,\"rect\",{x:-l,y:-r,width:p,height:w,fill:n}):\"\",h($,\"path\",{d:o(e),fill:i})],d)},s=(t,i,o={})=>i.body?n(t,o,e,i):n(t,o,e,i.ownerDocument,i),l=(t,e={})=>(e.xmlDeclaration?'<?xml version=\"1.0\" encoding=\"UTF-8\" ?>':\"\")+n(t,e,i),r=(t,e)=>\"data:image/svg+xml;base64,\"+btoa(l(t,{xmlDeclaration:1,...e}));export{s as toSvg,r as toSvgDataURL,o as toSvgPath,l as toSvgSource};\n","import { css, html, nothing, svg, unsafeCSS, type PropertyValues } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { correction, generate } from 'lean-qr/nano';\nimport { toSvgPath } from 'lean-qr/extras/svg';\nimport { trackEvent } from '../../base/analytics.js';\nimport { installLightDomStyles } from '../../base/light-dom-styles.js';\nimport { UvalibElement } from '../../base/UvalibElement.js';\n\nconst TAG = 'uvalib-qr';\nconst SVG_NS = 'http://www.w3.org/2000/svg';\n\n/** UVA navy, the default module colour (13.1:1 on white). */\nconst NAVY = '#232d4b';\nconst WHITE = '#ffffff';\nconst BLACK = '#000000';\n\n/** Error-correction levels: the share of the symbol that can be lost and still read. */\nexport type QrErrorCorrection = 'L' | 'M' | 'Q' | 'H';\nconst LEVELS: readonly QrErrorCorrection[] = ['L', 'M', 'Q', 'H'];\n\n/** Default `logo-size`: the cleared centre's side, in % of the symbol's side. */\nexport const QR_LOGO_SIZE = 20;\n/**\n * The cleared centre may cover at most this share of the symbol's area (with level H): 10%, about\n * 31% of the side. 20% did not decode at every size in testing (version 13 failed from 11%).\n */\nexport const QR_LOGO_MAX_AREA = 0.1;\n\n/** Schemes the visible link may point to; anything else (`javascript:`, `data:`, …) is text. */\nconst SAFE_SCHEMES = new Set(['http:', 'https:', 'mailto:', 'tel:']);\n\nconst squash = (s: string | null | undefined) => (s ?? '').replace(/\\s+/g, ' ').trim();\n\n/** The encoded symbol: its module grid (without the quiet zone) and how it was made. */\nexport interface QrCode {\n /** Modules per side (21 for version 1, up to 177). */\n readonly size: number;\n /** The error-correction level used (H whenever there is a logo). */\n readonly level: QrErrorCorrection;\n /** Whether the module at column `x`, row `y` is dark, as encoded (before any logo). */\n get(x: number, y: number): boolean;\n /** The square of modules cleared for the logo, in module units, if there is one. */\n readonly clear: { readonly x: number; readonly y: number; readonly size: number } | null;\n}\n\n/** `https://www.example.org/a/b/?q#h` → `example.org/a/b`; null when `value` is not such a URL. */\nexport function shortUrl(value: string): string | null {\n let url: URL;\n try {\n url = new URL(value);\n } catch {\n return null;\n }\n if (url.protocol === 'mailto:' || url.protocol === 'tel:') return url.pathname || null;\n if (url.protocol !== 'http:' && url.protocol !== 'https:') return null;\n const host = url.hostname.replace(/^www\\./, '');\n const path = decodeURI(url.pathname).replace(/\\/+$/, '');\n return host + path;\n}\n\n/** A rounded square, in module units: `M` … `z`, clockwise. */\nconst rounded = (x: number, y: number, s: number, r: number): string => {\n const e = s - 2 * r;\n const arc = (dx: number, dy: number) => `a${r} ${r} 0 0 1 ${dx} ${dy}`;\n return `M${x + r} ${y}h${e}${arc(r, r)}v${e}${arc(-r, r)}h${-e}${arc(-r, -r)}v${-e}${arc(r, -r)}z`;\n};\n\n/** The three finder patterns (\"eyes\") with rounded corners: a ring, then the centre square. */\nconst roundedEyes = (n: number): string =>\n [\n [0, 0],\n [n - 7, 0],\n [0, n - 7],\n ]\n .map(\n ([x, y]) =>\n rounded(x!, y!, 7, 2) + rounded(x! + 1, y! + 1, 5, 1) + rounded(x! + 2, y! + 2, 3, 1),\n )\n .join('');\n\nconst inEye = (n: number, x: number, y: number) =>\n (x < 7 && y < 7) || (x >= n - 7 && y < 7) || (x < 7 && y >= n - 7);\n\n/** The modules as one path (even-odd fill), with rounded eyes unless `plain`. */\nexport function qrPath(code: QrCode, plain: boolean): string {\n const n = code.size;\n const c = code.clear;\n const inClear = (x: number, y: number) =>\n !!c && x >= c.x && x < c.x + c.size && y >= c.y && y < c.y + c.size;\n const modules = toSvgPath({\n size: n,\n get: (x, y) =>\n x >= 0 &&\n y >= 0 &&\n x < n &&\n y < n &&\n !inClear(x, y) &&\n (plain || !inEye(n, x, y)) &&\n code.get(x, y),\n });\n return plain ? modules : modules + roundedEyes(n);\n}\n\n/**\n * The side of the cleared centre, in modules: odd (so it is centred), about `percent` of the\n * side, and never more than `QR_LOGO_MAX_AREA` of the symbol's area.\n */\nexport function clearSide(n: number, percent: number): { side: number; limited: boolean } {\n let s = Math.max(1, Math.round((n * percent) / 100));\n if (s % 2 === 0) s += 1;\n while (s > 1 && s * s > QR_LOGO_MAX_AREA * n * n) s -= 2;\n return { side: s, limited: percent > 100 * Math.sqrt(QR_LOGO_MAX_AREA) };\n}\n\n/** An address that may wrap after each slash and dot (a long one under a small code). */\nconst breakable = (text: string) =>\n text.split(/(?<=[/.])/).map((part, i) => (i ? html`<wbr />${part}` : part));\n\nconst esc = (s: string) =>\n s.replace(\n /[&<>\"]/g,\n (ch) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '\"': '&quot;' })[ch] ?? ch,\n );\n\n/**\n * Kept with `no-style`: the element is a block as wide as `--uvalib-qr-size` (at most its\n * container), the code a square that fills it, and the white tile. The code's own colours are\n * presentation attributes on the SVG, so it still reads without any style.\n */\nconst structuralRules = (host: string) => `\n ${host} {\n display: block;\n inline-size: var(--uvalib-qr-size, 10rem);\n max-inline-size: 100%;\n }\n ${host} .qr-tile { box-sizing: border-box; aspect-ratio: 1; background: #fff; }\n ${host} .qr-svg { display: block; inline-size: 100%; block-size: 100%; }\n`;\nconst shadowStructure = unsafeCSS(structuralRules(':host'));\n\nconst LINK = unsafeCSS('var(--uva-color-link, var(--uva-brand-blue, #232d4b))');\nconst LINK_HOVER = unsafeCSS('var(--uva-color-link-hover, var(--uva-blue-alt-A, #005679))');\nconst FOCUS = unsafeCSS('var(--uva-color-focus, var(--uva-brand-orange, #e57200))');\n\n/**\n * A QR code for a link (an event's page on a slide or a poster), styled for UVA Library:\n * modules in UVA navy on a white tile, the three \"eyes\" with rounded corners, and a thin orange\n * frame around the tile that carries no part of the code. `variant=\"plain\"` is a square black\n * code with no frame, for the oldest scanners.\n *\n * It is an inline `<svg role=\"img\">` whose `<title>` names it (`label`, else \"QR code for\n * example.org/path\"), crisp at any size and in print. The code stays dark on its white tile in\n * dark mode and in forced colors (scanners need that), and the quiet zone (`quiet-zone`, 4\n * modules) is part of the tile. The image is not a link; `show-link` (or `link-label`) adds the\n * address as a real link under it, for people who cannot scan.\n *\n * No logo is drawn by default (the University's marks may not be cut apart or boxed). A site\n * with approved artwork gives `logo-src` (and `logo-alt`): the modules under the centre are\n * cleared (`logo-size`, 20% of the side; at most 10% of the area), and level H is used.\n *\n * A value that cannot be encoded (empty, or too long) shows \"QR code unavailable\" in the tile,\n * with a console warning.\n *\n * @tagname uvalib-qr\n * @fires uvalib-analytics-event - For `<site-analytics>`: `['uvalib-qr', 'link-click']` when the visible link is followed (never the URL). Bubbles and is composed.\n * @csspart tile - The white tile (the code and its quiet zone), with the frame.\n * @csspart svg - The code's `<svg>`.\n * @csspart link - The visible link under the code (`show-link`).\n * @csspart fallback - The \"QR code unavailable\" text.\n * @cssprop [--uvalib-qr-size=10rem] - The tile's width and height (the `size` attribute sets it). At most the container's width.\n * @cssprop [--uvalib-qr-color=#232d4b] - The modules (else `--uva-brand-blue`). Keep it dark: at least 7:1 on white.\n * @cssprop [--uvalib-qr-frame=#e57200] - The frame (else `--uva-brand-orange`). It is decoration: never needed to scan.\n * @cssprop --uva-color-link - Dark-mode role token: the visible link (else `--uva-brand-blue`).\n * @cssprop --uva-color-focus - Dark-mode role token: focus ring (else `--uva-brand-orange`).\n */\nexport class UvalibQr extends UvalibElement {\n static styles = [\n shadowStructure,\n css`\n .qr-tile {\n overflow: hidden;\n border: 3px solid var(--uvalib-qr-frame, var(--uva-brand-orange, #e57200));\n border-radius: 8px;\n /* The code is an image: it keeps its colours in forced colors (dark on light). */\n forced-color-adjust: none;\n }\n :host([variant='plain']) .qr-tile {\n border: 0;\n border-radius: 0;\n }\n .qr-modules {\n fill: var(--uvalib-qr-color, var(--uva-brand-blue, #232d4b));\n }\n :host([variant='plain']) .qr-modules {\n fill: #000;\n }\n .qr-tile.invalid {\n display: grid;\n place-items: center;\n padding: 0.5rem;\n border: 2px dashed #6b7280;\n border-radius: 8px;\n color: #2b2b2b;\n font-size: 0.875rem;\n line-height: 1.4;\n text-align: center;\n }\n .qr-fallback {\n margin: 0;\n }\n .qr-link {\n margin: 0.5rem 0 0;\n font-size: 0.875rem;\n line-height: 1.7;\n text-align: center;\n overflow-wrap: break-word;\n }\n .qr-link a {\n color: ${LINK};\n text-decoration: underline;\n text-underline-offset: 0.15em;\n }\n .qr-link a:hover {\n color: ${LINK_HOVER};\n text-decoration-thickness: 2px;\n }\n .qr-link a:focus-visible {\n outline: 3px solid ${FOCUS};\n outline-offset: 2px;\n border-radius: 2px;\n }\n @media (forced-colors: active) {\n .qr-tile {\n /* Kept as an image, but outlined so the tile's edge shows on any theme. */\n outline: 2px solid CanvasText;\n }\n .qr-tile.invalid {\n forced-color-adjust: auto;\n border-color: CanvasText;\n }\n .qr-link a {\n color: LinkText;\n }\n }\n @media print {\n .qr-tile {\n border-color: transparent;\n print-color-adjust: exact;\n }\n .qr-link a {\n color: #000;\n }\n }\n `,\n ];\n\n /** The text encoded: usually a URL (required). */\n @property({ type: String }) value = '';\n\n /** The code's accessible name (default \"QR code for example.org/path\"). */\n @property({ type: String }) label = '';\n\n /** The tile's width and height: a number of pixels, or a CSS length (default 10rem). */\n @property({ type: String }) size = '';\n\n /** `L`, `M`, `Q` or `H` (default `M`; always `H` with a logo). */\n @property({ type: String, attribute: 'error-correction' }) errorCorrection = '';\n\n /** White modules around the code: 4 is the standard minimum (0 to 16). */\n @property({ type: Number, attribute: 'quiet-zone' }) quietZone = 4;\n\n /** `plain`: square black modules, no frame, for maximum compatibility. Default: branded. */\n @property({ type: String, reflect: true }) variant = '';\n\n /** Show the address as a link under the code (http, https, mailto and tel only). */\n @property({ type: Boolean, attribute: 'show-link' }) showLink = false;\n\n /** The visible link's text (default the address without its scheme); implies `show-link`. */\n @property({ type: String, attribute: 'link-label' }) linkLabel = '';\n\n /** Approved logo artwork for the centre (an image URL). Off by default. */\n @property({ type: String, attribute: 'logo-src' }) logoSrc = '';\n\n /** The logo's text alternative, added to the code's name; empty means decorative. */\n @property({ type: String, attribute: 'logo-alt' }) logoAlt = '';\n\n /** The cleared centre's side, in % of the symbol's side (default 20; at most about 31). */\n @property({ type: Number, attribute: 'logo-size' }) logoSize = QR_LOGO_SIZE;\n\n private _code: QrCode | null = null;\n private _path = '';\n private warned = new Set<string>();\n\n /** The encoded symbol, or null when the value could not be encoded. */\n get code(): QrCode | null {\n return this._code;\n }\n\n private warn(message: string): void {\n if (this.warned.has(message)) return;\n this.warned.add(message);\n console.warn(`${TAG}: ${message}`);\n }\n\n private get hasLogo(): boolean {\n return !!squash(this.logoSrc);\n }\n\n private get quiet(): number {\n const q = Math.round(Number(this.quietZone));\n return Number.isFinite(q) ? Math.min(16, Math.max(0, q)) : 4;\n }\n\n private get plain(): boolean {\n return this.variant === 'plain';\n }\n\n private level(): QrErrorCorrection {\n if (this.hasLogo) return 'H';\n const asked = squash(this.errorCorrection).toUpperCase();\n if (!asked) return 'M';\n if ((LEVELS as readonly string[]).includes(asked)) return asked as QrErrorCorrection;\n this.warn(`error-correction=\"${this.errorCorrection}\" is not L, M, Q or H; using M.`);\n return 'M';\n }\n\n private encode(): void {\n this._code = null;\n this._path = '';\n const value = this.value ?? '';\n if (!value) {\n this.warn('no value to encode.');\n return;\n }\n const level = this.level();\n let bitmap: { size: number; get(x: number, y: number): boolean };\n try {\n bitmap = generate(value, { minCorrectionLevel: correction[level] });\n } catch {\n this.warn(`the value (${value.length} characters) is too long for a QR code.`);\n return;\n }\n const n = bitmap.size;\n let clear: QrCode['clear'] = null;\n if (this.hasLogo) {\n const asked = Number(this.logoSize);\n const percent = Number.isFinite(asked) && asked > 0 ? asked : QR_LOGO_SIZE;\n const { side, limited } = clearSide(n, percent);\n if (limited)\n this.warn(\n `logo-size=\"${this.logoSize}\" is too big to scan reliably; the logo is limited to ${Math.round((100 * side) / n)}% of the side.`,\n );\n const at = (n - side) / 2;\n clear = { x: at, y: at, size: side };\n }\n this._code = { size: n, level, get: (x, y) => bitmap.get(x, y), clear };\n this._path = qrPath(this._code, this.plain);\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n if (\n changed.has('value') ||\n changed.has('errorCorrection') ||\n changed.has('logoSrc') ||\n changed.has('logoSize') ||\n changed.has('variant') ||\n !this.hasUpdated\n )\n this.encode();\n if (changed.has('size')) this.applySize();\n }\n\n /** `size` sets `--uvalib-qr-size` on the element (a number is pixels). */\n private applySize(): void {\n const raw = squash(this.size);\n const length = /^\\d+(\\.\\d+)?$/.test(raw) ? `${raw}px` : raw;\n const valid = !!raw && CSS.supports('width', length);\n if (raw && !valid) this.warn(`size=\"${this.size}\" is not a number of pixels or a CSS length.`);\n // The page's own inline --uvalib-qr-size is kept, and put back when `size` goes.\n if (valid) {\n this.ownSize ??= this.style.getPropertyValue('--uvalib-qr-size');\n this.style.setProperty('--uvalib-qr-size', length);\n } else if (this.ownSize !== undefined) {\n if (this.ownSize) this.style.setProperty('--uvalib-qr-size', this.ownSize);\n else this.style.removeProperty('--uvalib-qr-size');\n this.ownSize = undefined;\n }\n }\n\n /** The page's inline `--uvalib-qr-size` from before `size` set it ('' for none). */\n private ownSize?: string;\n\n override createRenderRoot(): HTMLElement | DocumentFragment {\n const root = super.createRenderRoot();\n if (root instanceof ShadowRoot && this.noStyle) {\n const sheet = shadowStructure.styleSheet;\n if (sheet) root.adoptedStyleSheets = [sheet];\n }\n return root;\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (this.lightDom && this.noStyle) {\n const node = this.getRootNode();\n installLightDomStyles(`${TAG}::structure`, unsafeCSS(structuralRules(TAG)), {\n root: node instanceof ShadowRoot || node instanceof Document ? node : undefined,\n scope: false,\n });\n }\n }\n\n /** The visible address, or null when `value` is not a URL. */\n private get short(): string | null {\n return shortUrl(squash(this.value));\n }\n\n /** The code's accessible name, as the `<title>` gives it. */\n get accessibleName(): string {\n const own = squash(this.label);\n let name = own;\n if (!name) {\n const short = this.short;\n const text = squash(this.value);\n name = short\n ? `QR code for ${short}`\n : text.length <= 60\n ? `QR code for “${text}”`\n : `QR code for “${text.slice(0, 57)}…”`;\n }\n const alt = squash(this.logoAlt);\n return this.hasLogo && alt ? `${name} (${alt})` : name;\n }\n\n /** The href of the visible link, if the value is a URL with a safe scheme. */\n private get href(): string | null {\n const value = squash(this.value);\n try {\n return SAFE_SCHEMES.has(new URL(value).protocol) ? value : null;\n } catch {\n return null;\n }\n }\n\n private readonly onLinkClick = (): void => {\n trackEvent(this, [TAG, 'link-click']);\n };\n\n /** The colours the code is drawn in now (resolved from the page's styles). */\n private colors(): { on: string; off: string } {\n const path = (this.renderRoot as ParentNode).querySelector?.('.qr-modules');\n const fill = path ? getComputedStyle(path).fill : '';\n const on =\n fill && fill !== 'none' && !fill.startsWith('url') ? fill : this.plain ? BLACK : NAVY;\n return { on, off: WHITE };\n }\n\n /**\n * The code as a standalone SVG document (for a poster or a print shop): the modules in the\n * colour they are drawn in, on white, with the quiet zone and the logo (by its URL), at\n * `scale` pixels per module (default 10). The frame is the page's and is not included.\n * Empty when the value could not be encoded.\n */\n toSvgString({ scale = 10 }: { scale?: number } = {}): string {\n const code = this._code;\n if (!code) return '';\n const q = this.quiet;\n const side = code.size + 2 * q;\n const px = side * (scale > 0 ? scale : 10);\n const { on, off } = this.colors();\n return (\n `<svg xmlns=\"${SVG_NS}\" viewBox=\"${-q} ${-q} ${side} ${side}\" width=\"${px}\" height=\"${px}\" role=\"img\">` +\n `<title>${esc(this.accessibleName)}</title>` +\n `<rect x=\"${-q}\" y=\"${-q}\" width=\"${side}\" height=\"${side}\" fill=\"${esc(off)}\"/>` +\n `<path fill=\"${esc(on)}\" fill-rule=\"evenodd\" d=\"${this._path}\"/>` +\n this.logoMarkup() +\n `</svg>`\n );\n }\n\n /** `toSvgString()` as a `data:image/svg+xml` URL. Empty when the value could not be encoded. */\n toDataURL(options?: { scale?: number }): string {\n const source = this.toSvgString(options);\n return source ? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(source)}` : '';\n }\n\n /** Save `toSvgString()` as a file (default `qr-code.svg`). Call it from a visitor's click. */\n download(filename = 'qr-code.svg'): void {\n const source = this.toSvgString();\n if (!source) return;\n const url = URL.createObjectURL(new Blob([source], { type: 'image/svg+xml' }));\n const a = this.ownerDocument.createElement('a');\n a.href = url;\n a.download = filename;\n a.hidden = true;\n this.ownerDocument.body.append(a);\n a.click();\n a.remove();\n setTimeout(() => URL.revokeObjectURL(url), 1000);\n }\n\n private logoBox(): { x: number; y: number; size: number } | null {\n const c = this._code?.clear;\n // Half a module of clear space inside the cleared square.\n return c && this.hasLogo ? { x: c.x + 0.5, y: c.y + 0.5, size: c.size - 1 } : null;\n }\n\n private logoMarkup(): string {\n const box = this.logoBox();\n if (!box) return '';\n return `<image href=\"${esc(squash(this.logoSrc))}\" x=\"${box.x}\" y=\"${box.y}\" width=\"${box.size}\" height=\"${box.size}\" preserveAspectRatio=\"xMidYMid meet\"/>`;\n }\n\n protected override render() {\n const code = this._code;\n const href = this.href;\n const wantsLink = this.showLink || !!squash(this.linkLabel);\n const link =\n wantsLink && href\n ? html`<p class=\"qr-link\">\n <a href=${href} part=\"link\" @click=${this.onLinkClick}\n >${squash(this.linkLabel) || breakable(this.short || href)}</a\n >\n </p>`\n : nothing;\n if (!code)\n return html`<div class=\"qr-tile invalid\" part=\"tile\">\n <p class=\"qr-fallback\" part=\"fallback\">QR code unavailable</p>\n </div>\n ${link}`;\n const q = this.quiet;\n const side = code.size + 2 * q;\n const box = this.logoBox();\n const plain = this.plain;\n return html`<div class=\"qr-tile\" part=\"tile\">\n <svg\n class=\"qr-svg\"\n part=\"svg\"\n role=\"img\"\n viewBox=\"${-q} ${-q} ${side} ${side}\"\n width=\"100%\"\n height=\"100%\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n <title>${this.accessibleName}</title>\n ${svg`<rect x=${-q} y=${-q} width=${side} height=${side} fill=${WHITE} />\n <path class=\"qr-modules\" fill=${plain ? BLACK : NAVY} fill-rule=\"evenodd\" d=${this._path} />\n ${\n box\n ? svg`<image href=${squash(this.logoSrc)} x=${box.x} y=${box.y} width=${box.size} height=${box.size} preserveAspectRatio=\"xMidYMid meet\" />`\n : nothing\n }`}\n </svg>\n </div>\n ${link}`;\n }\n}\n","import { define } from '../../base/define.js';\nimport { UvalibQr } from './UvalibQr.js';\n\ndefine('uvalib-qr', UvalibQr);\n"],"ignoreList":[0,1],"mappings":";;;AAAA,IAAMkB,IAAE;CAAC;CAAG,IAAE;CAAE,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DxE,EAAA,CAAAC,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAW,CAAC,CAAA,GAAAuE,EAAA,WAAA,WAAA,KAAA,CAAA,GAGhDxE,EAAA,CAAAC,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAW,CAAC,CAAA,GAAAuE,EAAA,WAAA,WAAA,KAAA,CAAA,GAGhDxE,EAAA,CAAAC,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAY,CAAC,CAAA,GAAAuE,EAAA,WAAA,YAAA,KAAA,CAAA,GC5RpDlE,EAAO,aAAakE,CAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uvalib/web-components",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "UVA Library reusable web components",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -195,6 +195,10 @@
195
195
  "types": "./dist/components/uvalib-audio/uvalib-audio.d.ts",
196
196
  "default": "./dist/components/uvalib-audio/uvalib-audio.js"
197
197
  },
198
+ "./uvalib-qr.js": {
199
+ "types": "./dist/components/uvalib-qr/uvalib-qr.d.ts",
200
+ "default": "./dist/components/uvalib-qr/uvalib-qr.js"
201
+ },
198
202
  "./tokens.css": "./dist/tokens.css",
199
203
  "./base.css": "./dist/base.css",
200
204
  "./pagefind.css": "./dist/pagefind.css",
@@ -238,6 +242,7 @@
238
242
  "report": "node --disable-warning=ExperimentalWarning scripts/test-report.mjs"
239
243
  },
240
244
  "dependencies": {
245
+ "lean-qr": "2.7.4",
241
246
  "lit": "^3.2.0"
242
247
  },
243
248
  "peerDependencies": {