@illinois-toolkit/ilw-quote 1.0.0-beta → 1.1.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/dist/ilw-quote.js CHANGED
@@ -1,608 +1,42 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const k = globalThis, j = k.ShadowRoot && (k.ShadyCSS === void 0 || k.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, I = Symbol(), D = /* @__PURE__ */ new WeakMap();
7
- let tt = class {
8
- constructor(t, e, s) {
9
- if (this._$cssResult$ = !0, s !== I) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
- this.cssText = t, this.t = e;
11
- }
12
- get styleSheet() {
13
- let t = this.o;
14
- const e = this.t;
15
- if (j && t === void 0) {
16
- const s = e !== void 0 && e.length === 1;
17
- s && (t = D.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && D.set(e, t));
18
- }
19
- return t;
20
- }
21
- toString() {
22
- return this.cssText;
23
- }
24
- };
25
- const nt = (o) => new tt(typeof o == "string" ? o : o + "", void 0, I), ht = (o, ...t) => {
26
- const e = o.length === 1 ? o[0] : t.reduce((s, i, n) => s + ((r) => {
27
- if (r._$cssResult$ === !0) return r.cssText;
28
- if (typeof r == "number") return r;
29
- throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
- })(i) + o[n + 1], o[0]);
31
- return new tt(e, o, I);
32
- }, lt = (o, t) => {
33
- if (j) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
34
- else for (const e of t) {
35
- const s = document.createElement("style"), i = k.litNonce;
36
- i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
37
- }
38
- }, V = j ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
39
- let e = "";
40
- for (const s of t.cssRules) e += s.cssText;
41
- return nt(e);
42
- })(o) : o;
43
- /**
44
- * @license
45
- * Copyright 2017 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */
48
- const { is: at, defineProperty: ct, getOwnPropertyDescriptor: dt, getOwnPropertyNames: pt, getOwnPropertySymbols: ut, getPrototypeOf: $t } = Object, f = globalThis, W = f.trustedTypes, _t = W ? W.emptyScript : "", R = f.reactiveElementPolyfillSupport, S = (o, t) => o, L = { toAttribute(o, t) {
49
- switch (t) {
50
- case Boolean:
51
- o = o ? _t : null;
52
- break;
53
- case Object:
54
- case Array:
55
- o = o == null ? o : JSON.stringify(o);
56
- }
57
- return o;
58
- }, fromAttribute(o, t) {
59
- let e = o;
60
- switch (t) {
61
- case Boolean:
62
- e = o !== null;
63
- break;
64
- case Number:
65
- e = o === null ? null : Number(o);
66
- break;
67
- case Object:
68
- case Array:
69
- try {
70
- e = JSON.parse(o);
71
- } catch {
72
- e = null;
73
- }
74
- }
75
- return e;
76
- } }, et = (o, t) => !at(o, t), K = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: et };
77
- Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), f.litPropertyMetadata ?? (f.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
78
- class y extends HTMLElement {
79
- static addInitializer(t) {
80
- this._$Ei(), (this.l ?? (this.l = [])).push(t);
81
- }
82
- static get observedAttributes() {
83
- return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
- }
85
- static createProperty(t, e = K) {
86
- if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
87
- const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
88
- i !== void 0 && ct(this.prototype, t, i);
89
- }
90
- }
91
- static getPropertyDescriptor(t, e, s) {
92
- const { get: i, set: n } = dt(this.prototype, t) ?? { get() {
93
- return this[e];
94
- }, set(r) {
95
- this[e] = r;
96
- } };
97
- return { get() {
98
- return i == null ? void 0 : i.call(this);
99
- }, set(r) {
100
- const a = i == null ? void 0 : i.call(this);
101
- n.call(this, r), this.requestUpdate(t, a, s);
102
- }, configurable: !0, enumerable: !0 };
103
- }
104
- static getPropertyOptions(t) {
105
- return this.elementProperties.get(t) ?? K;
106
- }
107
- static _$Ei() {
108
- if (this.hasOwnProperty(S("elementProperties"))) return;
109
- const t = $t(this);
110
- t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
111
- }
112
- static finalize() {
113
- if (this.hasOwnProperty(S("finalized"))) return;
114
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(S("properties"))) {
115
- const e = this.properties, s = [...pt(e), ...ut(e)];
116
- for (const i of s) this.createProperty(i, e[i]);
117
- }
118
- const t = this[Symbol.metadata];
119
- if (t !== null) {
120
- const e = litPropertyMetadata.get(t);
121
- if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
122
- }
123
- this._$Eh = /* @__PURE__ */ new Map();
124
- for (const [e, s] of this.elementProperties) {
125
- const i = this._$Eu(e, s);
126
- i !== void 0 && this._$Eh.set(i, e);
127
- }
128
- this.elementStyles = this.finalizeStyles(this.styles);
129
- }
130
- static finalizeStyles(t) {
131
- const e = [];
132
- if (Array.isArray(t)) {
133
- const s = new Set(t.flat(1 / 0).reverse());
134
- for (const i of s) e.unshift(V(i));
135
- } else t !== void 0 && e.push(V(t));
136
- return e;
137
- }
138
- static _$Eu(t, e) {
139
- const s = e.attribute;
140
- return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
141
- }
142
- constructor() {
143
- super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
144
- }
145
- _$Ev() {
146
- var t;
147
- this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
148
- }
149
- addController(t) {
150
- var e;
151
- (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
152
- }
153
- removeController(t) {
154
- var e;
155
- (e = this._$EO) == null || e.delete(t);
156
- }
157
- _$E_() {
158
- const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
159
- for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
160
- t.size > 0 && (this._$Ep = t);
161
- }
162
- createRenderRoot() {
163
- const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
164
- return lt(t, this.constructor.elementStyles), t;
165
- }
166
- connectedCallback() {
167
- var t;
168
- this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
169
- var s;
170
- return (s = e.hostConnected) == null ? void 0 : s.call(e);
171
- });
172
- }
173
- enableUpdating(t) {
174
- }
175
- disconnectedCallback() {
176
- var t;
177
- (t = this._$EO) == null || t.forEach((e) => {
178
- var s;
179
- return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
180
- });
181
- }
182
- attributeChangedCallback(t, e, s) {
183
- this._$AK(t, s);
184
- }
185
- _$EC(t, e) {
186
- var n;
187
- const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
188
- if (i !== void 0 && s.reflect === !0) {
189
- const r = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : L).toAttribute(e, s.type);
190
- this._$Em = t, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$Em = null;
191
- }
192
- }
193
- _$AK(t, e) {
194
- var n;
195
- const s = this.constructor, i = s._$Eh.get(t);
196
- if (i !== void 0 && this._$Em !== i) {
197
- const r = s.getPropertyOptions(i), a = typeof r.converter == "function" ? { fromAttribute: r.converter } : ((n = r.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? r.converter : L;
198
- this._$Em = i, this[i] = a.fromAttribute(e, r.type), this._$Em = null;
199
- }
200
- }
201
- requestUpdate(t, e, s) {
202
- if (t !== void 0) {
203
- if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? et)(this[t], e)) return;
204
- this.P(t, e, s);
205
- }
206
- this.isUpdatePending === !1 && (this._$ES = this._$ET());
207
- }
208
- P(t, e, s) {
209
- this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
210
- }
211
- async _$ET() {
212
- this.isUpdatePending = !0;
213
- try {
214
- await this._$ES;
215
- } catch (e) {
216
- Promise.reject(e);
217
- }
218
- const t = this.scheduleUpdate();
219
- return t != null && await t, !this.isUpdatePending;
220
- }
221
- scheduleUpdate() {
222
- return this.performUpdate();
223
- }
224
- performUpdate() {
225
- var s;
226
- if (!this.isUpdatePending) return;
227
- if (!this.hasUpdated) {
228
- if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
229
- for (const [n, r] of this._$Ep) this[n] = r;
230
- this._$Ep = void 0;
231
- }
232
- const i = this.constructor.elementProperties;
233
- if (i.size > 0) for (const [n, r] of i) r.wrapped !== !0 || this._$AL.has(n) || this[n] === void 0 || this.P(n, this[n], r);
234
- }
235
- let t = !1;
236
- const e = this._$AL;
237
- try {
238
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((i) => {
239
- var n;
240
- return (n = i.hostUpdate) == null ? void 0 : n.call(i);
241
- }), this.update(e)) : this._$EU();
242
- } catch (i) {
243
- throw t = !1, this._$EU(), i;
244
- }
245
- t && this._$AE(e);
246
- }
247
- willUpdate(t) {
248
- }
249
- _$AE(t) {
250
- var e;
251
- (e = this._$EO) == null || e.forEach((s) => {
252
- var i;
253
- return (i = s.hostUpdated) == null ? void 0 : i.call(s);
254
- }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
255
- }
256
- _$EU() {
257
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
258
- }
259
- get updateComplete() {
260
- return this.getUpdateComplete();
261
- }
262
- getUpdateComplete() {
263
- return this._$ES;
264
- }
265
- shouldUpdate(t) {
266
- return !0;
267
- }
268
- update(t) {
269
- this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
270
- }
271
- updated(t) {
272
- }
273
- firstUpdated(t) {
274
- }
275
- }
276
- y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[S("elementProperties")] = /* @__PURE__ */ new Map(), y[S("finalized")] = /* @__PURE__ */ new Map(), R == null || R({ ReactiveElement: y }), (f.reactiveElementVersions ?? (f.reactiveElementVersions = [])).push("2.0.4");
277
- /**
278
- * @license
279
- * Copyright 2017 Google LLC
280
- * SPDX-License-Identifier: BSD-3-Clause
281
- */
282
- const w = globalThis, H = w.trustedTypes, Z = H ? H.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, st = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, it = "?" + _, ft = `<${it}>`, g = document, x = () => g.createComment(""), C = (o) => o === null || typeof o != "object" && typeof o != "function", B = Array.isArray, mt = (o) => B(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", M = `[
283
- \f\r]`, b = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, F = /-->/g, J = />/g, m = RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Q = /'/g, G = /"/g, ot = /^(?:script|style|textarea|title)$/i, At = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), gt = At(1), v = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Y = /* @__PURE__ */ new WeakMap(), A = g.createTreeWalker(g, 129);
285
- function rt(o, t) {
286
- if (!B(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
- return Z !== void 0 ? Z.createHTML(t) : t;
288
- }
289
- const yt = (o, t) => {
290
- const e = o.length - 1, s = [];
291
- let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = b;
292
- for (let a = 0; a < e; a++) {
293
- const h = o[a];
294
- let c, p, l = -1, u = 0;
295
- for (; u < h.length && (r.lastIndex = u, p = r.exec(h), p !== null); ) u = r.lastIndex, r === b ? p[1] === "!--" ? r = F : p[1] !== void 0 ? r = J : p[2] !== void 0 ? (ot.test(p[2]) && (i = RegExp("</" + p[2], "g")), r = m) : p[3] !== void 0 && (r = m) : r === m ? p[0] === ">" ? (r = i ?? b, l = -1) : p[1] === void 0 ? l = -2 : (l = r.lastIndex - p[2].length, c = p[1], r = p[3] === void 0 ? m : p[3] === '"' ? G : Q) : r === G || r === Q ? r = m : r === F || r === J ? r = b : (r = m, i = void 0);
296
- const $ = r === m && o[a + 1].startsWith("/>") ? " " : "";
297
- n += r === b ? h + ft : l >= 0 ? (s.push(c), h.slice(0, l) + st + h.slice(l) + _ + $) : h + _ + (l === -2 ? a : $);
298
- }
299
- return [rt(o, n + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
300
- };
301
- class U {
302
- constructor({ strings: t, _$litType$: e }, s) {
303
- let i;
304
- this.parts = [];
305
- let n = 0, r = 0;
306
- const a = t.length - 1, h = this.parts, [c, p] = yt(t, e);
307
- if (this.el = U.createElement(c, s), A.currentNode = this.el.content, e === 2 || e === 3) {
308
- const l = this.el.content.firstChild;
309
- l.replaceWith(...l.childNodes);
310
- }
311
- for (; (i = A.nextNode()) !== null && h.length < a; ) {
312
- if (i.nodeType === 1) {
313
- if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(st)) {
314
- const u = p[r++], $ = i.getAttribute(l).split(_), T = /([.?@])?(.*)/.exec(u);
315
- h.push({ type: 1, index: n, name: T[2], strings: $, ctor: T[1] === "." ? Et : T[1] === "?" ? bt : T[1] === "@" ? St : N }), i.removeAttribute(l);
316
- } else l.startsWith(_) && (h.push({ type: 6, index: n }), i.removeAttribute(l));
317
- if (ot.test(i.tagName)) {
318
- const l = i.textContent.split(_), u = l.length - 1;
319
- if (u > 0) {
320
- i.textContent = H ? H.emptyScript : "";
321
- for (let $ = 0; $ < u; $++) i.append(l[$], x()), A.nextNode(), h.push({ type: 2, index: ++n });
322
- i.append(l[u], x());
323
- }
324
- }
325
- } else if (i.nodeType === 8) if (i.data === it) h.push({ type: 2, index: n });
326
- else {
327
- let l = -1;
328
- for (; (l = i.data.indexOf(_, l + 1)) !== -1; ) h.push({ type: 7, index: n }), l += _.length - 1;
329
- }
330
- n++;
331
- }
332
- }
333
- static createElement(t, e) {
334
- const s = g.createElement("template");
335
- return s.innerHTML = t, s;
336
- }
337
- }
338
- function E(o, t, e = o, s) {
339
- var r, a;
340
- if (t === v) return t;
341
- let i = s !== void 0 ? (r = e.o) == null ? void 0 : r[s] : e.l;
342
- const n = C(t) ? void 0 : t._$litDirective$;
343
- return (i == null ? void 0 : i.constructor) !== n && ((a = i == null ? void 0 : i._$AO) == null || a.call(i, !1), n === void 0 ? i = void 0 : (i = new n(o), i._$AT(o, e, s)), s !== void 0 ? (e.o ?? (e.o = []))[s] = i : e.l = i), i !== void 0 && (t = E(o, i._$AS(o, t.values), i, s)), t;
344
- }
345
- class vt {
346
- constructor(t, e) {
347
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
348
- }
349
- get parentNode() {
350
- return this._$AM.parentNode;
351
- }
352
- get _$AU() {
353
- return this._$AM._$AU;
354
- }
355
- u(t) {
356
- const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? g).importNode(e, !0);
357
- A.currentNode = i;
358
- let n = A.nextNode(), r = 0, a = 0, h = s[0];
359
- for (; h !== void 0; ) {
360
- if (r === h.index) {
361
- let c;
362
- h.type === 2 ? c = new O(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new wt(n, this, t)), this._$AV.push(c), h = s[++a];
363
- }
364
- r !== (h == null ? void 0 : h.index) && (n = A.nextNode(), r++);
365
- }
366
- return A.currentNode = g, i;
367
- }
368
- p(t) {
369
- let e = 0;
370
- for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
371
- }
372
- }
373
- class O {
374
- get _$AU() {
375
- var t;
376
- return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this.v;
377
- }
378
- constructor(t, e, s, i) {
379
- this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this.v = (i == null ? void 0 : i.isConnected) ?? !0;
380
- }
381
- get parentNode() {
382
- let t = this._$AA.parentNode;
383
- const e = this._$AM;
384
- return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
385
- }
386
- get startNode() {
387
- return this._$AA;
388
- }
389
- get endNode() {
390
- return this._$AB;
391
- }
392
- _$AI(t, e = this) {
393
- t = E(this, t, e), C(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== v && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : mt(t) ? this.k(t) : this._(t);
394
- }
395
- O(t) {
396
- return this._$AA.parentNode.insertBefore(t, this._$AB);
397
- }
398
- T(t) {
399
- this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
400
- }
401
- _(t) {
402
- this._$AH !== d && C(this._$AH) ? this._$AA.nextSibling.data = t : this.T(g.createTextNode(t)), this._$AH = t;
403
- }
404
- $(t) {
405
- var n;
406
- const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = U.createElement(rt(s.h, s.h[0]), this.options)), s);
407
- if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(e);
408
- else {
409
- const r = new vt(i, this), a = r.u(this.options);
410
- r.p(e), this.T(a), this._$AH = r;
411
- }
412
- }
413
- _$AC(t) {
414
- let e = Y.get(t.strings);
415
- return e === void 0 && Y.set(t.strings, e = new U(t)), e;
416
- }
417
- k(t) {
418
- B(this._$AH) || (this._$AH = [], this._$AR());
419
- const e = this._$AH;
420
- let s, i = 0;
421
- for (const n of t) i === e.length ? e.push(s = new O(this.O(x()), this.O(x()), this, this.options)) : s = e[i], s._$AI(n), i++;
422
- i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
423
- }
424
- _$AR(t = this._$AA.nextSibling, e) {
425
- var s;
426
- for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
427
- const i = t.nextSibling;
428
- t.remove(), t = i;
429
- }
430
- }
431
- setConnected(t) {
432
- var e;
433
- this._$AM === void 0 && (this.v = t, (e = this._$AP) == null || e.call(this, t));
434
- }
435
- }
436
- class N {
437
- get tagName() {
438
- return this.element.tagName;
439
- }
440
- get _$AU() {
441
- return this._$AM._$AU;
442
- }
443
- constructor(t, e, s, i, n) {
444
- this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = d;
445
- }
446
- _$AI(t, e = this, s, i) {
447
- const n = this.strings;
448
- let r = !1;
449
- if (n === void 0) t = E(this, t, e, 0), r = !C(t) || t !== this._$AH && t !== v, r && (this._$AH = t);
450
- else {
451
- const a = t;
452
- let h, c;
453
- for (t = n[0], h = 0; h < n.length - 1; h++) c = E(this, a[s + h], e, h), c === v && (c = this._$AH[h]), r || (r = !C(c) || c !== this._$AH[h]), c === d ? t = d : t !== d && (t += (c ?? "") + n[h + 1]), this._$AH[h] = c;
454
- }
455
- r && !i && this.j(t);
456
- }
457
- j(t) {
458
- t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
- }
460
- }
461
- class Et extends N {
462
- constructor() {
463
- super(...arguments), this.type = 3;
464
- }
465
- j(t) {
466
- this.element[this.name] = t === d ? void 0 : t;
467
- }
468
- }
469
- class bt extends N {
470
- constructor() {
471
- super(...arguments), this.type = 4;
472
- }
473
- j(t) {
474
- this.element.toggleAttribute(this.name, !!t && t !== d);
475
- }
476
- }
477
- class St extends N {
478
- constructor(t, e, s, i, n) {
479
- super(t, e, s, i, n), this.type = 5;
480
- }
481
- _$AI(t, e = this) {
482
- if ((t = E(this, t, e, 0) ?? d) === v) return;
483
- const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== d && (s === d || i);
484
- i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
485
- }
486
- handleEvent(t) {
487
- var e;
488
- typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
489
- }
490
- }
491
- class wt {
492
- constructor(t, e, s) {
493
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
494
- }
495
- get _$AU() {
496
- return this._$AM._$AU;
497
- }
498
- _$AI(t) {
499
- E(this, t);
500
- }
501
- }
502
- const q = w.litHtmlPolyfillSupport;
503
- q == null || q(U, O), (w.litHtmlVersions ?? (w.litHtmlVersions = [])).push("3.2.0");
504
- const Pt = (o, t, e) => {
505
- const s = (e == null ? void 0 : e.renderBefore) ?? t;
506
- let i = s._$litPart$;
507
- if (i === void 0) {
508
- const n = (e == null ? void 0 : e.renderBefore) ?? null;
509
- s._$litPart$ = i = new O(t.insertBefore(x(), n), n, void 0, e ?? {});
510
- }
511
- return i._$AI(o), i;
1
+ import { LitElement as c, unsafeCSS as p, html as m } from "lit";
2
+ import { property as i, customElement as v } from "lit/decorators.js";
3
+ const h = ":host{display:block;background:var(--ilw-quote--background)}#quote{margin:0 auto;max-width:var(--ilw-quote--max-width)}#content{color:var(--ilw-quote--color);position:relative}#content:before{content:var(--ilw-quote--mark-content-before);position:relative;font-style:normal;color:var(--ilw-quote--mark-color);font:var(--ilw-quote--mark-font);line-height:1;height:var(--ilw-quote--mark-height);top:var(--ilw-quote--mark-top);display:block}";
4
+ var f = Object.defineProperty, d = Object.getOwnPropertyDescriptor, e = (u, r, n, l) => {
5
+ for (var t = l > 1 ? void 0 : l ? d(r, n) : r, s = u.length - 1, a; s >= 0; s--)
6
+ (a = u[s]) && (t = (l ? a(r, n, t) : a(t)) || t);
7
+ return l && t && f(r, n, t), t;
512
8
  };
513
- /**
514
- * @license
515
- * Copyright 2017 Google LLC
516
- * SPDX-License-Identifier: BSD-3-Clause
517
- */
518
- class P extends y {
9
+ let o = class extends c {
519
10
  constructor() {
520
- super(...arguments), this.renderOptions = { host: this }, this.o = void 0;
521
- }
522
- createRenderRoot() {
523
- var e;
524
- const t = super.createRenderRoot();
525
- return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
526
- }
527
- update(t) {
528
- const e = this.render();
529
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this.o = Pt(e, this.renderRoot, this.renderOptions);
530
- }
531
- connectedCallback() {
532
- var t;
533
- super.connectedCallback(), (t = this.o) == null || t.setConnected(!0);
534
- }
535
- disconnectedCallback() {
536
- var t;
537
- super.disconnectedCallback(), (t = this.o) == null || t.setConnected(!1);
538
- }
539
- render() {
540
- return v;
541
- }
542
- }
543
- var X;
544
- P._$litElement$ = !0, P.finalized = !0, (X = globalThis.litElementHydrateSupport) == null || X.call(globalThis, { LitElement: P });
545
- const z = globalThis.litElementPolyfillSupport;
546
- z == null || z({ LitElement: P });
547
- (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.0");
548
- const xt = ht`
549
- :host {
550
- display: block;
551
- background: var(--ilw-quote--background);
552
- }
553
-
554
- #quote {
555
- margin: 0 auto;
556
- max-width: var(--ilw-quote--max-width);
557
- padding: 50px 80px;
558
- }
559
-
560
- #content {
561
- color: var(--ilw-quote--color);
562
- font: var(--ilw-quote--font);
563
- text-align: center;
564
- position: relative;
565
- }
566
-
567
- #content::before {
568
- position: absolute;
569
- content: var(--ilw-quote--mark-content-before);
570
- font-style: normal;
571
- color: var(--ilw-quote--mark-color);
572
- font: var(--ilw-quote--mark-font);
573
- top: var(--ilw-quote--mark-top);
574
- left: var(--ilw-quote--mark-left);
575
- }
576
-
577
- #content::after {
578
- position: absolute;
579
- content: var(--ilw-quote--mark-content-after);
580
- font-style: normal;
581
- bottom: 0px;
582
- color: var(--ilw-quote--mark-color);
583
- font: var(--ilw-quote--mark-font);
584
- right: var(--ilw-quote--mark-left);
585
- }
586
- `;
587
- class Ct extends P {
588
- static get properties() {
589
- return {
590
- theme: { type: String, attribute: !0 }
591
- };
11
+ super(), this.theme = "", this.align = "center", this.size = "small", this.font = "serif";
592
12
  }
593
13
  static get styles() {
594
- return xt;
595
- }
596
- constructor() {
597
- super(), this.theme = "";
14
+ return p(h);
598
15
  }
599
16
  render() {
600
- return gt`
17
+ return m`
601
18
  <blockquote id="quote">
602
19
  <div id="content"><slot name="content"></slot></div>
603
20
  <div id="source"><slot name="author"></slot><slot name="source"></slot></div>
604
21
  </blockquote>
605
22
  `;
606
23
  }
607
- }
608
- customElements.define("ilw-quote", Ct);
24
+ };
25
+ e([
26
+ i()
27
+ ], o.prototype, "theme", 2);
28
+ e([
29
+ i()
30
+ ], o.prototype, "align", 2);
31
+ e([
32
+ i()
33
+ ], o.prototype, "size", 2);
34
+ e([
35
+ i()
36
+ ], o.prototype, "font", 2);
37
+ o = e([
38
+ v("ilw-quote")
39
+ ], o);
40
+ export {
41
+ o as default
42
+ };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "repository": "github:web-illinois/ilw-quote",
5
5
  "private": false,
6
6
  "license": "MIT",
7
- "version": "1.0.0-beta",
7
+ "version": "1.1.0",
8
8
  "type": "module",
9
9
  "files": [
10
10
  "src/**",
@@ -13,15 +13,19 @@
13
13
  ],
14
14
  "exports": {
15
15
  ".": {
16
- "import": "./src/ilw-quote.js",
16
+ "import": "./dist/ilw-quote.js",
17
17
  "require": "./dist/ilw-quote.cjs",
18
18
  "default": "./dist/ilw-quote.js"
19
+ },
20
+ "./ilw-quote.css": {
21
+ "import": "./dist/ilw-quote.css"
19
22
  }
20
23
  },
21
- "main":"./dist/ilw-quote.js",
24
+ "main": "./dist/ilw-quote.js",
25
+ "module": "./dist/ilw-quote.js",
22
26
  "scripts": {
23
27
  "dev": "vite",
24
- "build": "vite build --config vite.build.config.js --emptyOutDir",
28
+ "build": "vite build --config vite.transpile.config.js --emptyOutDir && vite build --config vite.build.config.js --emptyOutDir",
25
29
  "preview": "vite preview",
26
30
  "prepack": "npm run build"
27
31
  },
@@ -29,6 +33,10 @@
29
33
  "lit": "3.1.3"
30
34
  },
31
35
  "devDependencies": {
32
- "vite": "^5.2.0"
36
+ "prettier": "^3.5.1",
37
+ "typescript": "^5.7.3",
38
+ "vite": "^5.4.14",
39
+ "vite-plugin-dts": "^4.5.0",
40
+ "@types/node": "^22.13.4"
33
41
  }
34
42
  }