@record-evolution/widget-label 1.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 widget-label
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # \<widget-label>
2
+
3
+ A lightweight Lit web component that displays a single configurable text label.
4
+
5
+ # Usage
6
+
7
+ ## Installation & Import
8
+
9
+ ```bash
10
+ npm i @record-evolution/widget-label
11
+ ```
12
+
13
+ ```html
14
+ <script type="module">
15
+ import '@record-evolution/widget-label'
16
+ </script>
17
+
18
+ <widget-label-1.0.0 inputData="default-data"></widget-label-1.0.0>
19
+ ```
20
+
21
+ ## Expected Data Format
22
+
23
+ The widget accepts an `inputData` object with the following structure:
24
+
25
+ ```json
26
+ {
27
+ "text": "Hello, IronFlock",
28
+ "fontSize": 32,
29
+ "fontColor": "#291f42",
30
+ "fontWeight": "bold",
31
+ "fontStyle": "normal",
32
+ "textAlign": "center",
33
+ "verticalAlign": "center",
34
+ "backgroundColor": ""
35
+ }
36
+ ```
37
+
38
+ ### Properties
39
+
40
+ - **text** (textarea): The text to display. Line breaks are preserved.
41
+ - **fontSize** (number): Font size in pixels. Defaults to 16.
42
+ - **fontColor** (color): CSS color for the text. Falls back to the platform theme color when empty.
43
+ - **fontWeight** (enum): One of `normal`, `bold`, `lighter`, `bolder`, or numeric weights `100`–`900`.
44
+ - **fontStyle** (enum): One of `normal`, `italic`, `oblique`.
45
+ - **textAlign** (enum): Horizontal alignment — `left`, `center`, `right`, `justify`.
46
+ - **verticalAlign** (enum): Vertical alignment within the tile — `top`, `center`, `bottom`.
47
+ - **backgroundColor** (color): CSS background color for the tile. Falls back to the platform theme background when empty.
48
+
49
+ ## Development
50
+
51
+ > Keep the widget tag name in sync with the version in `package.json`. The demo derives the tag from `package.json` automatically.
52
+
53
+ To develop the widget locally:
54
+
55
+ ```bash
56
+ npm run start
57
+ ```
58
+
59
+ This starts a development server at `localhost:8000/demo/` serving `demo/index.html`.
60
+
61
+ ## Releasing a New Version
62
+
63
+ 1. Commit all changes.
64
+ 2. Regenerate types from the schema (if modified):
65
+ ```bash
66
+ npm run types
67
+ ```
68
+ 3. Release:
69
+ ```bash
70
+ npm run release
71
+ ```
72
+
73
+ This builds the widget, bumps the patch version, creates a git tag, and pushes. GitHub Actions then publishes the release to npm.
74
+
75
+ ### Platform Registration
76
+
77
+ After publishing, register the new version in IronFlock:
78
+
79
+ ```sql
80
+ select swarm.f_update_widget_master('{"package_name": "widget-label", "version": "1.0.0"}'::jsonb);
81
+ ```
@@ -0,0 +1,635 @@
1
+ const M = globalThis, k = M.ShadowRoot && (M.ShadyCSS === void 0 || M.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, z = /* @__PURE__ */ Symbol(), q = /* @__PURE__ */ new WeakMap();
2
+ let st = class {
3
+ constructor(t, e, s) {
4
+ if (this._$cssResult$ = !0, s !== z) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
5
+ this.cssText = t, this.t = e;
6
+ }
7
+ get styleSheet() {
8
+ let t = this.o;
9
+ const e = this.t;
10
+ if (k && t === void 0) {
11
+ const s = e !== void 0 && e.length === 1;
12
+ s && (t = q.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && q.set(e, t));
13
+ }
14
+ return t;
15
+ }
16
+ toString() {
17
+ return this.cssText;
18
+ }
19
+ };
20
+ const at = (r) => new st(typeof r == "string" ? r : r + "", void 0, z), lt = (r, ...t) => {
21
+ const e = r.length === 1 ? r[0] : t.reduce((s, i, o) => s + ((n) => {
22
+ if (n._$cssResult$ === !0) return n.cssText;
23
+ if (typeof n == "number") return n;
24
+ throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
25
+ })(i) + r[o + 1], r[0]);
26
+ return new st(e, r, z);
27
+ }, ct = (r, t) => {
28
+ if (k) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
29
+ else for (const e of t) {
30
+ const s = document.createElement("style"), i = M.litNonce;
31
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
32
+ }
33
+ }, Z = k ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
34
+ let e = "";
35
+ for (const s of t.cssRules) e += s.cssText;
36
+ return at(e);
37
+ })(r) : r;
38
+ const { is: dt, defineProperty: pt, getOwnPropertyDescriptor: ut, getOwnPropertyNames: $t, getOwnPropertySymbols: ft, getPrototypeOf: _t } = Object, R = globalThis, J = R.trustedTypes, gt = J ? J.emptyScript : "", mt = R.reactiveElementPolyfillSupport, S = (r, t) => r, H = { toAttribute(r, t) {
39
+ switch (t) {
40
+ case Boolean:
41
+ r = r ? gt : null;
42
+ break;
43
+ case Object:
44
+ case Array:
45
+ r = r == null ? r : JSON.stringify(r);
46
+ }
47
+ return r;
48
+ }, fromAttribute(r, t) {
49
+ let e = r;
50
+ switch (t) {
51
+ case Boolean:
52
+ e = r !== null;
53
+ break;
54
+ case Number:
55
+ e = r === null ? null : Number(r);
56
+ break;
57
+ case Object:
58
+ case Array:
59
+ try {
60
+ e = JSON.parse(r);
61
+ } catch {
62
+ e = null;
63
+ }
64
+ }
65
+ return e;
66
+ } }, B = (r, t) => !dt(r, t), K = { attribute: !0, type: String, converter: H, reflect: !1, useDefault: !1, hasChanged: B };
67
+ Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), R.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
+ let A = class extends HTMLElement {
69
+ static addInitializer(t) {
70
+ this._$Ei(), (this.l ??= []).push(t);
71
+ }
72
+ static get observedAttributes() {
73
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
74
+ }
75
+ static createProperty(t, e = K) {
76
+ if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
77
+ const s = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, s, e);
78
+ i !== void 0 && pt(this.prototype, t, i);
79
+ }
80
+ }
81
+ static getPropertyDescriptor(t, e, s) {
82
+ const { get: i, set: o } = ut(this.prototype, t) ?? { get() {
83
+ return this[e];
84
+ }, set(n) {
85
+ this[e] = n;
86
+ } };
87
+ return { get: i, set(n) {
88
+ const a = i?.call(this);
89
+ o?.call(this, n), this.requestUpdate(t, a, s);
90
+ }, configurable: !0, enumerable: !0 };
91
+ }
92
+ static getPropertyOptions(t) {
93
+ return this.elementProperties.get(t) ?? K;
94
+ }
95
+ static _$Ei() {
96
+ if (this.hasOwnProperty(S("elementProperties"))) return;
97
+ const t = _t(this);
98
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
99
+ }
100
+ static finalize() {
101
+ if (this.hasOwnProperty(S("finalized"))) return;
102
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(S("properties"))) {
103
+ const e = this.properties, s = [...$t(e), ...ft(e)];
104
+ for (const i of s) this.createProperty(i, e[i]);
105
+ }
106
+ const t = this[Symbol.metadata];
107
+ if (t !== null) {
108
+ const e = litPropertyMetadata.get(t);
109
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
110
+ }
111
+ this._$Eh = /* @__PURE__ */ new Map();
112
+ for (const [e, s] of this.elementProperties) {
113
+ const i = this._$Eu(e, s);
114
+ i !== void 0 && this._$Eh.set(i, e);
115
+ }
116
+ this.elementStyles = this.finalizeStyles(this.styles);
117
+ }
118
+ static finalizeStyles(t) {
119
+ const e = [];
120
+ if (Array.isArray(t)) {
121
+ const s = new Set(t.flat(1 / 0).reverse());
122
+ for (const i of s) e.unshift(Z(i));
123
+ } else t !== void 0 && e.push(Z(t));
124
+ return e;
125
+ }
126
+ static _$Eu(t, e) {
127
+ const s = e.attribute;
128
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
129
+ }
130
+ constructor() {
131
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
132
+ }
133
+ _$Ev() {
134
+ this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
135
+ }
136
+ addController(t) {
137
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
138
+ }
139
+ removeController(t) {
140
+ this._$EO?.delete(t);
141
+ }
142
+ _$E_() {
143
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
144
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
145
+ t.size > 0 && (this._$Ep = t);
146
+ }
147
+ createRenderRoot() {
148
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
149
+ return ct(t, this.constructor.elementStyles), t;
150
+ }
151
+ connectedCallback() {
152
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
153
+ }
154
+ enableUpdating(t) {
155
+ }
156
+ disconnectedCallback() {
157
+ this._$EO?.forEach((t) => t.hostDisconnected?.());
158
+ }
159
+ attributeChangedCallback(t, e, s) {
160
+ this._$AK(t, s);
161
+ }
162
+ _$ET(t, e) {
163
+ const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
164
+ if (i !== void 0 && s.reflect === !0) {
165
+ const o = (s.converter?.toAttribute !== void 0 ? s.converter : H).toAttribute(e, s.type);
166
+ this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
167
+ }
168
+ }
169
+ _$AK(t, e) {
170
+ const s = this.constructor, i = s._$Eh.get(t);
171
+ if (i !== void 0 && this._$Em !== i) {
172
+ const o = s.getPropertyOptions(i), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : H;
173
+ this._$Em = i;
174
+ const a = n.fromAttribute(e, o.type);
175
+ this[i] = a ?? this._$Ej?.get(i) ?? a, this._$Em = null;
176
+ }
177
+ }
178
+ requestUpdate(t, e, s, i = !1, o) {
179
+ if (t !== void 0) {
180
+ const n = this.constructor;
181
+ if (i === !1 && (o = this[t]), s ??= n.getPropertyOptions(t), !((s.hasChanged ?? B)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, s)))) return;
182
+ this.C(t, e, s);
183
+ }
184
+ this.isUpdatePending === !1 && (this._$ES = this._$EP());
185
+ }
186
+ C(t, e, { useDefault: s, reflect: i, wrapped: o }, n) {
187
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
188
+ }
189
+ async _$EP() {
190
+ this.isUpdatePending = !0;
191
+ try {
192
+ await this._$ES;
193
+ } catch (e) {
194
+ Promise.reject(e);
195
+ }
196
+ const t = this.scheduleUpdate();
197
+ return t != null && await t, !this.isUpdatePending;
198
+ }
199
+ scheduleUpdate() {
200
+ return this.performUpdate();
201
+ }
202
+ performUpdate() {
203
+ if (!this.isUpdatePending) return;
204
+ if (!this.hasUpdated) {
205
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
206
+ for (const [i, o] of this._$Ep) this[i] = o;
207
+ this._$Ep = void 0;
208
+ }
209
+ const s = this.constructor.elementProperties;
210
+ if (s.size > 0) for (const [i, o] of s) {
211
+ const { wrapped: n } = o, a = this[i];
212
+ n !== !0 || this._$AL.has(i) || a === void 0 || this.C(i, void 0, o, a);
213
+ }
214
+ }
215
+ let t = !1;
216
+ const e = this._$AL;
217
+ try {
218
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(e)) : this._$EM();
219
+ } catch (s) {
220
+ throw t = !1, this._$EM(), s;
221
+ }
222
+ t && this._$AE(e);
223
+ }
224
+ willUpdate(t) {
225
+ }
226
+ _$AE(t) {
227
+ this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
228
+ }
229
+ _$EM() {
230
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
231
+ }
232
+ get updateComplete() {
233
+ return this.getUpdateComplete();
234
+ }
235
+ getUpdateComplete() {
236
+ return this._$ES;
237
+ }
238
+ shouldUpdate(t) {
239
+ return !0;
240
+ }
241
+ update(t) {
242
+ this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
243
+ }
244
+ updated(t) {
245
+ }
246
+ firstUpdated(t) {
247
+ }
248
+ };
249
+ A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[S("elementProperties")] = /* @__PURE__ */ new Map(), A[S("finalized")] = /* @__PURE__ */ new Map(), mt?.({ ReactiveElement: A }), (R.reactiveElementVersions ??= []).push("2.1.2");
250
+ const L = globalThis, F = (r) => r, N = L.trustedTypes, G = N ? N.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, it = "$lit$", f = `lit$${Math.random().toFixed(9).slice(2)}$`, rt = "?" + f, yt = `<${rt}>`, m = document, C = () => m.createComment(""), x = (r) => r === null || typeof r != "object" && typeof r != "function", I = Array.isArray, At = (r) => I(r) || typeof r?.[Symbol.iterator] == "function", j = `[
251
+ \f\r]`, E = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Q = /-->/g, X = />/g, _ = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Y = /'/g, tt = /"/g, ot = /^(?:script|style|textarea|title)$/i, vt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), bt = vt(1), v = /* @__PURE__ */ Symbol.for("lit-noChange"), d = /* @__PURE__ */ Symbol.for("lit-nothing"), et = /* @__PURE__ */ new WeakMap(), g = m.createTreeWalker(m, 129);
253
+ function nt(r, t) {
254
+ if (!I(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
+ return G !== void 0 ? G.createHTML(t) : t;
256
+ }
257
+ const Et = (r, t) => {
258
+ const e = r.length - 1, s = [];
259
+ let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = E;
260
+ for (let a = 0; a < e; a++) {
261
+ const h = r[a];
262
+ let c, p, l = -1, u = 0;
263
+ for (; u < h.length && (n.lastIndex = u, p = n.exec(h), p !== null); ) u = n.lastIndex, n === E ? p[1] === "!--" ? n = Q : p[1] !== void 0 ? n = X : p[2] !== void 0 ? (ot.test(p[2]) && (i = RegExp("</" + p[2], "g")), n = _) : p[3] !== void 0 && (n = _) : n === _ ? p[0] === ">" ? (n = i ?? E, l = -1) : p[1] === void 0 ? l = -2 : (l = n.lastIndex - p[2].length, c = p[1], n = p[3] === void 0 ? _ : p[3] === '"' ? tt : Y) : n === tt || n === Y ? n = _ : n === Q || n === X ? n = E : (n = _, i = void 0);
264
+ const $ = n === _ && r[a + 1].startsWith("/>") ? " " : "";
265
+ o += n === E ? h + yt : l >= 0 ? (s.push(c), h.slice(0, l) + it + h.slice(l) + f + $) : h + f + (l === -2 ? a : $);
266
+ }
267
+ return [nt(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
268
+ };
269
+ class P {
270
+ constructor({ strings: t, _$litType$: e }, s) {
271
+ let i;
272
+ this.parts = [];
273
+ let o = 0, n = 0;
274
+ const a = t.length - 1, h = this.parts, [c, p] = Et(t, e);
275
+ if (this.el = P.createElement(c, s), g.currentNode = this.el.content, e === 2 || e === 3) {
276
+ const l = this.el.content.firstChild;
277
+ l.replaceWith(...l.childNodes);
278
+ }
279
+ for (; (i = g.nextNode()) !== null && h.length < a; ) {
280
+ if (i.nodeType === 1) {
281
+ if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(it)) {
282
+ const u = p[n++], $ = i.getAttribute(l).split(f), T = /([.?@])?(.*)/.exec(u);
283
+ h.push({ type: 1, index: o, name: T[2], strings: $, ctor: T[1] === "." ? wt : T[1] === "?" ? Ct : T[1] === "@" ? xt : D }), i.removeAttribute(l);
284
+ } else l.startsWith(f) && (h.push({ type: 6, index: o }), i.removeAttribute(l));
285
+ if (ot.test(i.tagName)) {
286
+ const l = i.textContent.split(f), u = l.length - 1;
287
+ if (u > 0) {
288
+ i.textContent = N ? N.emptyScript : "";
289
+ for (let $ = 0; $ < u; $++) i.append(l[$], C()), g.nextNode(), h.push({ type: 2, index: ++o });
290
+ i.append(l[u], C());
291
+ }
292
+ }
293
+ } else if (i.nodeType === 8) if (i.data === rt) h.push({ type: 2, index: o });
294
+ else {
295
+ let l = -1;
296
+ for (; (l = i.data.indexOf(f, l + 1)) !== -1; ) h.push({ type: 7, index: o }), l += f.length - 1;
297
+ }
298
+ o++;
299
+ }
300
+ }
301
+ static createElement(t, e) {
302
+ const s = m.createElement("template");
303
+ return s.innerHTML = t, s;
304
+ }
305
+ }
306
+ function b(r, t, e = r, s) {
307
+ if (t === v) return t;
308
+ let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
309
+ const o = x(t) ? void 0 : t._$litDirective$;
310
+ return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = b(r, i._$AS(r, t.values), i, s)), t;
311
+ }
312
+ class St {
313
+ constructor(t, e) {
314
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
315
+ }
316
+ get parentNode() {
317
+ return this._$AM.parentNode;
318
+ }
319
+ get _$AU() {
320
+ return this._$AM._$AU;
321
+ }
322
+ u(t) {
323
+ const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? m).importNode(e, !0);
324
+ g.currentNode = i;
325
+ let o = g.nextNode(), n = 0, a = 0, h = s[0];
326
+ for (; h !== void 0; ) {
327
+ if (n === h.index) {
328
+ let c;
329
+ h.type === 2 ? c = new O(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new Pt(o, this, t)), this._$AV.push(c), h = s[++a];
330
+ }
331
+ n !== h?.index && (o = g.nextNode(), n++);
332
+ }
333
+ return g.currentNode = m, i;
334
+ }
335
+ p(t) {
336
+ let e = 0;
337
+ 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++;
338
+ }
339
+ }
340
+ class O {
341
+ get _$AU() {
342
+ return this._$AM?._$AU ?? this._$Cv;
343
+ }
344
+ constructor(t, e, s, i) {
345
+ this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
346
+ }
347
+ get parentNode() {
348
+ let t = this._$AA.parentNode;
349
+ const e = this._$AM;
350
+ return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
351
+ }
352
+ get startNode() {
353
+ return this._$AA;
354
+ }
355
+ get endNode() {
356
+ return this._$AB;
357
+ }
358
+ _$AI(t, e = this) {
359
+ t = b(this, t, e), x(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) : At(t) ? this.k(t) : this._(t);
360
+ }
361
+ O(t) {
362
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
363
+ }
364
+ T(t) {
365
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
366
+ }
367
+ _(t) {
368
+ this._$AH !== d && x(this._$AH) ? this._$AA.nextSibling.data = t : this.T(m.createTextNode(t)), this._$AH = t;
369
+ }
370
+ $(t) {
371
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = P.createElement(nt(s.h, s.h[0]), this.options)), s);
372
+ if (this._$AH?._$AD === i) this._$AH.p(e);
373
+ else {
374
+ const o = new St(i, this), n = o.u(this.options);
375
+ o.p(e), this.T(n), this._$AH = o;
376
+ }
377
+ }
378
+ _$AC(t) {
379
+ let e = et.get(t.strings);
380
+ return e === void 0 && et.set(t.strings, e = new P(t)), e;
381
+ }
382
+ k(t) {
383
+ I(this._$AH) || (this._$AH = [], this._$AR());
384
+ const e = this._$AH;
385
+ let s, i = 0;
386
+ for (const o of t) i === e.length ? e.push(s = new O(this.O(C()), this.O(C()), this, this.options)) : s = e[i], s._$AI(o), i++;
387
+ i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
388
+ }
389
+ _$AR(t = this._$AA.nextSibling, e) {
390
+ for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
391
+ const s = F(t).nextSibling;
392
+ F(t).remove(), t = s;
393
+ }
394
+ }
395
+ setConnected(t) {
396
+ this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
397
+ }
398
+ }
399
+ class D {
400
+ get tagName() {
401
+ return this.element.tagName;
402
+ }
403
+ get _$AU() {
404
+ return this._$AM._$AU;
405
+ }
406
+ constructor(t, e, s, i, o) {
407
+ this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = d;
408
+ }
409
+ _$AI(t, e = this, s, i) {
410
+ const o = this.strings;
411
+ let n = !1;
412
+ if (o === void 0) t = b(this, t, e, 0), n = !x(t) || t !== this._$AH && t !== v, n && (this._$AH = t);
413
+ else {
414
+ const a = t;
415
+ let h, c;
416
+ for (t = o[0], h = 0; h < o.length - 1; h++) c = b(this, a[s + h], e, h), c === v && (c = this._$AH[h]), n ||= !x(c) || c !== this._$AH[h], c === d ? t = d : t !== d && (t += (c ?? "") + o[h + 1]), this._$AH[h] = c;
417
+ }
418
+ n && !i && this.j(t);
419
+ }
420
+ j(t) {
421
+ t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
422
+ }
423
+ }
424
+ class wt extends D {
425
+ constructor() {
426
+ super(...arguments), this.type = 3;
427
+ }
428
+ j(t) {
429
+ this.element[this.name] = t === d ? void 0 : t;
430
+ }
431
+ }
432
+ class Ct extends D {
433
+ constructor() {
434
+ super(...arguments), this.type = 4;
435
+ }
436
+ j(t) {
437
+ this.element.toggleAttribute(this.name, !!t && t !== d);
438
+ }
439
+ }
440
+ class xt extends D {
441
+ constructor(t, e, s, i, o) {
442
+ super(t, e, s, i, o), this.type = 5;
443
+ }
444
+ _$AI(t, e = this) {
445
+ if ((t = b(this, t, e, 0) ?? d) === v) return;
446
+ const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== d && (s === d || i);
447
+ i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
448
+ }
449
+ handleEvent(t) {
450
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
451
+ }
452
+ }
453
+ class Pt {
454
+ constructor(t, e, s) {
455
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
456
+ }
457
+ get _$AU() {
458
+ return this._$AM._$AU;
459
+ }
460
+ _$AI(t) {
461
+ b(this, t);
462
+ }
463
+ }
464
+ const Ot = L.litHtmlPolyfillSupport;
465
+ Ot?.(P, O), (L.litHtmlVersions ??= []).push("3.3.2");
466
+ const Ut = (r, t, e) => {
467
+ const s = e?.renderBefore ?? t;
468
+ let i = s._$litPart$;
469
+ if (i === void 0) {
470
+ const o = e?.renderBefore ?? null;
471
+ s._$litPart$ = i = new O(t.insertBefore(C(), o), o, void 0, e ?? {});
472
+ }
473
+ return i._$AI(r), i;
474
+ };
475
+ const W = globalThis;
476
+ class w extends A {
477
+ constructor() {
478
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
479
+ }
480
+ createRenderRoot() {
481
+ const t = super.createRenderRoot();
482
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
483
+ }
484
+ update(t) {
485
+ const e = this.render();
486
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ut(e, this.renderRoot, this.renderOptions);
487
+ }
488
+ connectedCallback() {
489
+ super.connectedCallback(), this._$Do?.setConnected(!0);
490
+ }
491
+ disconnectedCallback() {
492
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
493
+ }
494
+ render() {
495
+ return v;
496
+ }
497
+ }
498
+ w._$litElement$ = !0, w.finalized = !0, W.litElementHydrateSupport?.({ LitElement: w });
499
+ const Tt = W.litElementPolyfillSupport;
500
+ Tt?.({ LitElement: w });
501
+ (W.litElementVersions ??= []).push("4.2.2");
502
+ const Mt = (r) => (t, e) => {
503
+ e !== void 0 ? e.addInitializer(() => {
504
+ customElements.define(r, t);
505
+ }) : customElements.define(r, t);
506
+ };
507
+ const Ht = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: B }, Nt = (r = Ht, t, e) => {
508
+ const { kind: s, metadata: i } = e;
509
+ let o = globalThis.litPropertyMetadata.get(i);
510
+ if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), o.set(e.name, r), s === "accessor") {
511
+ const { name: n } = e;
512
+ return { set(a) {
513
+ const h = t.get.call(this);
514
+ t.set.call(this, a), this.requestUpdate(n, h, r, !0, a);
515
+ }, init(a) {
516
+ return a !== void 0 && this.C(n, void 0, r, a), a;
517
+ } };
518
+ }
519
+ if (s === "setter") {
520
+ const { name: n } = e;
521
+ return function(a) {
522
+ const h = this[n];
523
+ t.call(this, a), this.requestUpdate(n, h, r, !0, a);
524
+ };
525
+ }
526
+ throw Error("Unsupported decorator location: " + s);
527
+ };
528
+ function V(r) {
529
+ return (t, e) => typeof e == "object" ? Nt(r, t, e) : ((s, i, o) => {
530
+ const n = i.hasOwnProperty(o);
531
+ return i.constructor.createProperty(o, s), n ? Object.getOwnPropertyDescriptor(i, o) : void 0;
532
+ })(r, t, e);
533
+ }
534
+ function ht(r) {
535
+ return V({ ...r, state: !0, attribute: !1 });
536
+ }
537
+ var Rt = Object.defineProperty, Dt = Object.getOwnPropertyDescriptor, U = (r, t, e, s) => {
538
+ for (var i = s > 1 ? void 0 : s ? Dt(t, e) : t, o = r.length - 1, n; o >= 0; o--)
539
+ (n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
540
+ return s && i && Rt(t, e, i), i;
541
+ };
542
+ let y = class extends w {
543
+ constructor() {
544
+ super(...arguments), this.version = "1.0.1";
545
+ }
546
+ update(r) {
547
+ r.has("theme") && this.registerTheme(this.theme), super.update(r);
548
+ }
549
+ firstUpdated(r) {
550
+ this.registerTheme(this.theme);
551
+ }
552
+ registerTheme(r) {
553
+ const t = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), e = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
554
+ this.themeBgColor = e || r?.theme_object?.backgroundColor, this.themeTextColor = t || r?.theme_object?.title?.textStyle?.color;
555
+ }
556
+ justifyContent() {
557
+ switch (this.inputData?.verticalAlign) {
558
+ case "top":
559
+ return "flex-start";
560
+ case "bottom":
561
+ return "flex-end";
562
+ default:
563
+ return "center";
564
+ }
565
+ }
566
+ render() {
567
+ const r = this.inputData?.fontSize ?? 16, t = this.inputData?.fontColor || this.themeTextColor || "inherit", e = this.inputData?.fontWeight ?? "normal", s = this.inputData?.fontStyle ?? "normal", i = this.inputData?.textAlign ?? "left", o = this.inputData?.backgroundColor || this.themeBgColor || "transparent";
568
+ return bt`
569
+ <div
570
+ class="wrapper"
571
+ style="
572
+ background-color: ${o};
573
+ justify-content: ${i === "center" ? "center" : i === "right" ? "flex-end" : "flex-start"};
574
+ align-items: ${this.justifyContent()};
575
+ "
576
+ >
577
+ <div
578
+ class="label"
579
+ style="
580
+ font-size: ${r}px;
581
+ color: ${t};
582
+ font-weight: ${e};
583
+ font-style: ${s};
584
+ text-align: ${i};
585
+ "
586
+ >
587
+ ${this.inputData?.text ?? ""}
588
+ </div>
589
+ </div>
590
+ `;
591
+ }
592
+ };
593
+ y.styles = lt`
594
+ :host {
595
+ display: block;
596
+ font-family: sans-serif;
597
+ box-sizing: border-box;
598
+ width: 100%;
599
+ height: 100%;
600
+ }
601
+
602
+ .wrapper {
603
+ display: flex;
604
+ width: 100%;
605
+ height: 100%;
606
+ box-sizing: border-box;
607
+ padding: 8px;
608
+ overflow: hidden;
609
+ }
610
+
611
+ .label {
612
+ width: 100%;
613
+ white-space: pre-wrap;
614
+ word-break: break-word;
615
+ }
616
+ `;
617
+ U([
618
+ V({ type: Object })
619
+ ], y.prototype, "inputData", 2);
620
+ U([
621
+ V({ type: Object })
622
+ ], y.prototype, "theme", 2);
623
+ U([
624
+ ht()
625
+ ], y.prototype, "themeBgColor", 2);
626
+ U([
627
+ ht()
628
+ ], y.prototype, "themeTextColor", 2);
629
+ y = U([
630
+ Mt("widget-label-1.0.1")
631
+ ], y);
632
+ export {
633
+ y as WidgetLabel
634
+ };
635
+ //# sourceMappingURL=widget-label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-label.js","sources":["../node_modules/@lit/reactive-element/css-tag.js","../node_modules/@lit/reactive-element/reactive-element.js","../node_modules/lit-html/lit-html.js","../node_modules/lit-element/lit-element.js","../node_modules/@lit/reactive-element/decorators/custom-element.js","../node_modules/@lit/reactive-element/decorators/property.js","../node_modules/@lit/reactive-element/decorators/state.js","../src/widget-label.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1],t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i,e=!1,h){if(void 0!==t){const r=this.constructor;if(!1===e&&(h=this[t]),i??=r.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.2\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,i=t=>t,s=t.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,h=\"$lit$\",o=`lit$${Math.random().toFixed(9).slice(2)}$`,n=\"?\"+o,r=`<${n}>`,l=document,c=()=>l.createComment(\"\"),a=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,u=Array.isArray,d=t=>u(t)||\"function\"==typeof t?.[Symbol.iterator],f=\"[ \\t\\n\\f\\r]\",v=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${f}(?:([^\\\\s\"'>=/]+)(${f}*=${f}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,x=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),b=x(1),w=x(2),T=x(3),E=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),C=new WeakMap,P=l.createTreeWalker(l,129);function V(t,i){if(!u(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const N=(t,i)=>{const s=t.length-1,e=[];let n,l=2===i?\"<svg>\":3===i?\"<math>\":\"\",c=v;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,f=0;for(;f<s.length&&(c.lastIndex=f,u=c.exec(s),null!==u);)f=c.lastIndex,c===v?\"!--\"===u[1]?c=_:void 0!==u[1]?c=m:void 0!==u[2]?(y.test(u[2])&&(n=RegExp(\"</\"+u[2],\"g\")),c=p):void 0!==u[3]&&(c=p):c===p?\">\"===u[0]?(c=n??v,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?p:'\"'===u[3]?$:g):c===$||c===g?c=p:c===_||c===m?c=v:(c=p,n=void 0);const x=c===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";l+=c===v?s+r:d>=0?(e.push(a),s.slice(0,d)+h+s.slice(d)+o+x):s+o+(-2===d?i:x)}return[V(t,l+(t[s]||\"<?>\")+(2===i?\"</svg>\":3===i?\"</math>\":\"\")),e]};class S{constructor({strings:t,_$litType$:i},e){let r;this.parts=[];let l=0,a=0;const u=t.length-1,d=this.parts,[f,v]=N(t,i);if(this.el=S.createElement(f,e),P.currentNode=this.el.content,2===i||3===i){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=P.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(h)){const i=v[a++],s=r.getAttribute(t).split(o),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:l,name:e[2],strings:s,ctor:\".\"===e[1]?I:\"?\"===e[1]?L:\"@\"===e[1]?z:H}),r.removeAttribute(t)}else t.startsWith(o)&&(d.push({type:6,index:l}),r.removeAttribute(t));if(y.test(r.tagName)){const t=r.textContent.split(o),i=t.length-1;if(i>0){r.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)r.append(t[s],c()),P.nextNode(),d.push({type:2,index:++l});r.append(t[i],c())}}}else if(8===r.nodeType)if(r.data===n)d.push({type:2,index:l});else{let t=-1;for(;-1!==(t=r.data.indexOf(o,t+1));)d.push({type:7,index:l}),t+=o.length-1}l++}}static createElement(t,i){const s=l.createElement(\"template\");return s.innerHTML=t,s}}function M(t,i,s=t,e){if(i===E)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=a(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(!1),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=M(t,h._$AS(t,i.values),h,e)),i}class R{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??l).importNode(i,!0);P.currentNode=e;let h=P.nextNode(),o=0,n=0,r=s[0];for(;void 0!==r;){if(o===r.index){let i;2===r.type?i=new k(h,h.nextSibling,this,t):1===r.type?i=new r.ctor(h,r.name,r.strings,this,t):6===r.type&&(i=new Z(h,this,t)),this._$AV.push(i),r=s[++n]}o!==r?.index&&(h=P.nextNode(),o++)}return P.currentNode=l,e}p(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class k{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=M(this,t,i),a(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==E&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):d(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&a(this._$AH)?this._$AA.nextSibling.data=t:this.T(l.createTextNode(t)),this._$AH=t}$(t){const{values:i,_$litType$:s}=t,e=\"number\"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=S.createElement(V(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else{const t=new R(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t}}_$AC(t){let i=C.get(t.strings);return void 0===i&&C.set(t.strings,i=new S(t)),i}k(t){u(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new k(this.O(c()),this.O(c()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);t!==this._$AB;){const s=i(t).nextSibling;i(t).remove(),t=s}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class H{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=M(this,t,i,0),o=!a(t)||t!==this._$AH&&t!==E,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=M(this,e[s+n],i,n),r===E&&(r=this._$AH[n]),o||=!a(r)||r!==this._$AH[n],r===A?t=A:t!==A&&(t+=(r??\"\")+h[n+1]),this._$AH[n]=r}o&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??\"\")}}class I extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}class L extends H{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}}class z extends H{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5}_$AI(t,i=this){if((t=M(this,t,i,0)??A)===E)return;const s=this._$AH,e=t===A&&s!==A||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==A&&(s===A||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){\"function\"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const j={M:h,P:o,A:n,C:1,L:N,R,D:d,V:M,I:k,H,N:L,U:z,B:I,F:Z},B=t.litHtmlPolyfillSupport;B?.(S,k),(t.litHtmlVersions??=[]).push(\"3.3.2\");const D=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new k(i.insertBefore(c(),t),t,void 0,s??{})}return h._$AI(t),h};export{j as _$LH,b as html,T as mathml,E as noChange,A as nothing,D as render,w as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as r}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const s=globalThis;class i extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return r}}i._$litElement$=!0,i[\"finalized\"]=!0,s.litElementHydrateSupport?.({LitElement:i});const o=s.litElementPolyfillSupport;o?.({LitElement:i});const n={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(s.litElementVersions??=[]).push(\"4.2.2\");export{i as LitElement,n as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=t=>(e,o)=>{void 0!==o?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};export{t as customElement};\n//# sourceMappingURL=custom-element.js.map\n","import{notEqual as t,defaultConverter as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:e,reflect:!1,hasChanged:t},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t,!0,r)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t,!0,r)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import { html, css, LitElement, PropertyValues } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { InputData } from './definition-schema.js'\n\ntype Theme = {\n theme_name: string\n theme_object: any\n}\n\n@customElement('widget-label-versionplaceholder')\nexport class WidgetLabel extends LitElement {\n @property({ type: Object })\n inputData?: InputData\n\n @property({ type: Object })\n theme?: Theme\n\n @state() private themeBgColor?: string\n @state() private themeTextColor?: string\n\n version: string = 'versionplaceholder'\n\n update(changedProperties: PropertyValues) {\n if (changedProperties.has('theme')) {\n this.registerTheme(this.theme)\n }\n super.update(changedProperties)\n }\n\n protected firstUpdated(_changedProperties: PropertyValues): void {\n this.registerTheme(this.theme)\n }\n\n registerTheme(theme?: Theme) {\n const cssTextColor = getComputedStyle(this).getPropertyValue('--re-text-color').trim()\n const cssBgColor = getComputedStyle(this).getPropertyValue('--re-tile-background-color').trim()\n this.themeBgColor = cssBgColor || theme?.theme_object?.backgroundColor\n this.themeTextColor = cssTextColor || theme?.theme_object?.title?.textStyle?.color\n }\n\n static styles = css`\n :host {\n display: block;\n font-family: sans-serif;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n }\n\n .wrapper {\n display: flex;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n padding: 8px;\n overflow: hidden;\n }\n\n .label {\n width: 100%;\n white-space: pre-wrap;\n word-break: break-word;\n }\n `\n\n private justifyContent(): string {\n switch (this.inputData?.verticalAlign) {\n case 'top':\n return 'flex-start'\n case 'bottom':\n return 'flex-end'\n case 'center':\n default:\n return 'center'\n }\n }\n\n render() {\n const fontSize = this.inputData?.fontSize ?? 16\n const fontColor = this.inputData?.fontColor || this.themeTextColor || 'inherit'\n const fontWeight = this.inputData?.fontWeight ?? 'normal'\n const fontStyle = this.inputData?.fontStyle ?? 'normal'\n const textAlign = this.inputData?.textAlign ?? 'left'\n const backgroundColor = this.inputData?.backgroundColor || this.themeBgColor || 'transparent'\n\n return html`\n <div\n class=\"wrapper\"\n style=\"\n background-color: ${backgroundColor};\n justify-content: ${textAlign === 'center'\n ? 'center'\n : textAlign === 'right'\n ? 'flex-end'\n : 'flex-start'};\n align-items: ${this.justifyContent()};\n \"\n >\n <div\n class=\"label\"\n style=\"\n font-size: ${fontSize}px;\n color: ${fontColor};\n font-weight: ${fontWeight};\n font-style: ${fontStyle};\n text-align: ${textAlign};\n \"\n >\n ${this.inputData?.text ?? ''}\n </div>\n </div>\n `\n }\n}\n"],"names":["t","e","s","o","n$3","r","n","i","S","c","h","a","l","p","d","u","f","b","y$1","y","v","_","m","g","$","x","E","A","C","P","V","N","I","L","z","H","M","R","k","Z","B","D","WidgetLabel","LitElement","changedProperties","_changedProperties","theme","cssTextColor","cssBgColor","fontSize","fontColor","fontWeight","fontStyle","textAlign","backgroundColor","html","css","__decorateClass","property","state","customElement"],"mappings":"AAKA,MAAMA,IAAE,YAAWC,IAAED,EAAE,eAAsBA,EAAE,aAAX,UAAqBA,EAAE,SAAS,iBAAe,wBAAuB,SAAS,aAAW,aAAY,c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AAA,sCACTC,CAAS;AAAA;AAAA;AAAA,sBAGzB,KAAK,WAAW,QAAQ,EAAE;AAAA;AAAA;AAAA;AAAA,EAI5C;AACJ;AAvGaX,EA8BF,SAASc;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AA5BhBC,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GADjBhB,EAET,WAAA,aAAA,CAAA;AAGAe,EAAA;AAAA,EADCC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAJjBhB,EAKT,WAAA,SAAA,CAAA;AAEiBe,EAAA;AAAA,EAAhBE,GAAA;AAAM,GAPEjB,EAOQ,WAAA,gBAAA,CAAA;AACAe,EAAA;AAAA,EAAhBE,GAAA;AAAM,GAREjB,EAQQ,WAAA,kBAAA,CAAA;AARRA,IAANe,EAAA;AAAA,EADNG,GAAc,oBAAiC;AAAA,GACnClB,CAAA;","x_google_ignoreList":[0,1,2,3,4,5,6]}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@record-evolution/widget-label",
3
+ "description": "Lightweight Lit web component that displays a configurable text label",
4
+ "license": "MIT",
5
+ "author": "widget-label",
6
+ "version": "1.0.1",
7
+ "engines": {
8
+ "node": ">=24.9.0",
9
+ "npm": ">=10.0.2"
10
+ },
11
+ "type": "module",
12
+ "main": "dist/widget-label.js",
13
+ "types": "dist/src/widget-label.d.ts",
14
+ "files": [
15
+ "dist",
16
+ "src",
17
+ "thumbnail.png"
18
+ ],
19
+ "scripts": {
20
+ "analyze": "cem analyze --litelement",
21
+ "start": "vite build --watch & vite",
22
+ "build": "vite build",
23
+ "watch": "vite build --watch",
24
+ "link": "npm run build && npm link && cd ../RESWARM/frontend && npm link @record-evolution/widget-label",
25
+ "unlink": "npm unlink --global && cd ../RESWARM/frontend && npm unlink @record-evolution/widget-label && npm i @record-evolution/widget-label",
26
+ "types": "cat src/definition-schema.json | json2ts > src/definition-schema.d.ts",
27
+ "release": "npm run build && npm run types && npm version patch --tag-version-prefix='' && git push && git push --tag && npm run build"
28
+ },
29
+ "dependencies": {
30
+ "lit": "^3.3.2",
31
+ "tslib": "^2.8.1"
32
+ },
33
+ "devDependencies": {
34
+ "@custom-elements-manifest/analyzer": "^0.10.4",
35
+ "@rollup/plugin-replace": "^6.0.2",
36
+ "json-schema-to-typescript": "^15.0.4",
37
+ "typescript": "^5.8.3",
38
+ "vite": "^7.3.1"
39
+ },
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "git+https://github.com/RecordEvolution/widget-label.git"
43
+ },
44
+ "keywords": [
45
+ "widget",
46
+ "label",
47
+ "text"
48
+ ],
49
+ "bugs": {
50
+ "url": "https://github.com/RecordEvolution/widget-label/issues"
51
+ },
52
+ "homepage": "https://github.com/RecordEvolution/widget-label#readme"
53
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "text": "Hello, IronFlock",
3
+ "fontSize": 32,
4
+ "fontColor": "#291f42",
5
+ "fontWeight": "bold",
6
+ "fontStyle": "normal",
7
+ "textAlign": "center",
8
+ "verticalAlign": "center",
9
+ "backgroundColor": ""
10
+ }
@@ -0,0 +1,73 @@
1
+ /* eslint-disable */
2
+ /**
3
+ * This file was automatically generated by json-schema-to-typescript.
4
+ * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
5
+ * and run json-schema-to-typescript to regenerate this file.
6
+ */
7
+
8
+ /**
9
+ * Font size in pixels. Defaults to 16 if not set.
10
+ */
11
+ export type FontSize = number;
12
+ /**
13
+ * Weight of the text. Defaults to 'normal'.
14
+ */
15
+ export type FontWeight =
16
+ | "normal"
17
+ | "bold"
18
+ | "lighter"
19
+ | "bolder"
20
+ | "100"
21
+ | "200"
22
+ | "300"
23
+ | "400"
24
+ | "500"
25
+ | "600"
26
+ | "700"
27
+ | "800"
28
+ | "900";
29
+ /**
30
+ * Style of the text. Defaults to 'normal'.
31
+ */
32
+ export type FontStyle = "normal" | "italic" | "oblique";
33
+ /**
34
+ * Horizontal alignment of the text within the widget tile. Defaults to 'left'.
35
+ */
36
+ export type TextAlignment = "left" | "center" | "right" | "justify";
37
+ /**
38
+ * Vertical alignment of the text within the widget tile. Defaults to 'center'.
39
+ */
40
+ export type VerticalAlignment = "top" | "center" | "bottom";
41
+
42
+ /**
43
+ * A lightweight label widget for displaying a single configurable text string. Use this widget for headings, captions, status indicators, KPI labels, or any place a dashboard needs simple styled text. The widget exposes typography controls (font size, color, weight, alignment) and an optional background color so it can be themed independently of the surrounding tile.
44
+ */
45
+ export interface InputData {
46
+ text?: Text;
47
+ fontColor?: FontColor;
48
+ fontSize?: FontSize;
49
+ fontWeight?: FontWeight;
50
+ fontStyle?: FontStyle;
51
+ textAlign?: TextAlignment;
52
+ verticalAlign?: VerticalAlignment;
53
+ backgroundColor?: BackgroundColor;
54
+ [k: string]: unknown;
55
+ }
56
+ /**
57
+ * The text content to display. Supports plain text and standard whitespace; line breaks are preserved.
58
+ */
59
+ export interface Text {
60
+ [k: string]: unknown;
61
+ }
62
+ /**
63
+ * CSS color for the text (e.g. '#291f42', 'red', 'rgb(0,0,0)'). If empty, the platform theme's text color is used.
64
+ */
65
+ export interface FontColor {
66
+ [k: string]: unknown;
67
+ }
68
+ /**
69
+ * CSS color for the widget background (e.g. '#ffffff', 'transparent'). If empty, the platform theme's tile background is used.
70
+ */
71
+ export interface BackgroundColor {
72
+ [k: string]: unknown;
73
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "title": "InputData",
3
+ "description": "A lightweight label widget for displaying a single configurable text string. Use this widget for headings, captions, status indicators, KPI labels, or any place a dashboard needs simple styled text. The widget exposes typography controls (font size, color, weight, alignment) and an optional background color so it can be themed independently of the surrounding tile.",
4
+ "type": "object",
5
+ "properties": {
6
+ "text": {
7
+ "title": "Text",
8
+ "description": "The text content to display. Supports plain text and standard whitespace; line breaks are preserved.",
9
+ "order": 1,
10
+ "type": "textarea"
11
+ },
12
+ "fontColor": {
13
+ "title": "Font Color",
14
+ "description": "CSS color for the text (e.g. '#291f42', 'red', 'rgb(0,0,0)'). If empty, the platform theme's text color is used.",
15
+ "order": 2,
16
+ "type": "color"
17
+ },
18
+ "fontSize": {
19
+ "title": "Font Size",
20
+ "description": "Font size in pixels. Defaults to 16 if not set.",
21
+ "order": 3,
22
+ "dataDrivenDisabled": true,
23
+ "type": "number",
24
+ "default": 16
25
+ },
26
+ "fontWeight": {
27
+ "title": "Font Weight",
28
+ "description": "Weight of the text. Defaults to 'normal'.",
29
+ "order": 4,
30
+ "dataDrivenDisabled": true,
31
+ "type": "string",
32
+ "enum": ["normal", "bold", "lighter", "bolder", "100", "200", "300", "400", "500", "600", "700", "800", "900"],
33
+ "default": "normal"
34
+ },
35
+ "fontStyle": {
36
+ "title": "Font Style",
37
+ "description": "Style of the text. Defaults to 'normal'.",
38
+ "order": 5,
39
+ "dataDrivenDisabled": true,
40
+ "type": "string",
41
+ "enum": ["normal", "italic", "oblique"],
42
+ "default": "normal"
43
+ },
44
+ "textAlign": {
45
+ "title": "Text Alignment",
46
+ "description": "Horizontal alignment of the text within the widget tile. Defaults to 'left'.",
47
+ "order": 6,
48
+ "dataDrivenDisabled": true,
49
+ "type": "string",
50
+ "enum": ["left", "center", "right", "justify"],
51
+ "default": "left"
52
+ },
53
+ "verticalAlign": {
54
+ "title": "Vertical Alignment",
55
+ "description": "Vertical alignment of the text within the widget tile. Defaults to 'center'.",
56
+ "order": 7,
57
+ "dataDrivenDisabled": true,
58
+ "type": "string",
59
+ "enum": ["top", "center", "bottom"],
60
+ "default": "center"
61
+ },
62
+ "backgroundColor": {
63
+ "title": "Background Color",
64
+ "description": "CSS color for the widget background (e.g. '#ffffff', 'transparent'). If empty, the platform theme's tile background is used.",
65
+ "dataDrivenDisabled": true,
66
+ "order": 8,
67
+ "type": "color"
68
+ }
69
+ }
70
+ }
@@ -0,0 +1 @@
1
+ /// <reference types="vite/client" />
@@ -0,0 +1,114 @@
1
+ import { html, css, LitElement, PropertyValues } from 'lit'
2
+ import { customElement, property, state } from 'lit/decorators.js'
3
+ import { InputData } from './definition-schema.js'
4
+
5
+ type Theme = {
6
+ theme_name: string
7
+ theme_object: any
8
+ }
9
+
10
+ @customElement('widget-label-versionplaceholder')
11
+ export class WidgetLabel extends LitElement {
12
+ @property({ type: Object })
13
+ inputData?: InputData
14
+
15
+ @property({ type: Object })
16
+ theme?: Theme
17
+
18
+ @state() private themeBgColor?: string
19
+ @state() private themeTextColor?: string
20
+
21
+ version: string = 'versionplaceholder'
22
+
23
+ update(changedProperties: PropertyValues) {
24
+ if (changedProperties.has('theme')) {
25
+ this.registerTheme(this.theme)
26
+ }
27
+ super.update(changedProperties)
28
+ }
29
+
30
+ protected firstUpdated(_changedProperties: PropertyValues): void {
31
+ this.registerTheme(this.theme)
32
+ }
33
+
34
+ registerTheme(theme?: Theme) {
35
+ const cssTextColor = getComputedStyle(this).getPropertyValue('--re-text-color').trim()
36
+ const cssBgColor = getComputedStyle(this).getPropertyValue('--re-tile-background-color').trim()
37
+ this.themeBgColor = cssBgColor || theme?.theme_object?.backgroundColor
38
+ this.themeTextColor = cssTextColor || theme?.theme_object?.title?.textStyle?.color
39
+ }
40
+
41
+ static styles = css`
42
+ :host {
43
+ display: block;
44
+ font-family: sans-serif;
45
+ box-sizing: border-box;
46
+ width: 100%;
47
+ height: 100%;
48
+ }
49
+
50
+ .wrapper {
51
+ display: flex;
52
+ width: 100%;
53
+ height: 100%;
54
+ box-sizing: border-box;
55
+ padding: 8px;
56
+ overflow: hidden;
57
+ }
58
+
59
+ .label {
60
+ width: 100%;
61
+ white-space: pre-wrap;
62
+ word-break: break-word;
63
+ }
64
+ `
65
+
66
+ private justifyContent(): string {
67
+ switch (this.inputData?.verticalAlign) {
68
+ case 'top':
69
+ return 'flex-start'
70
+ case 'bottom':
71
+ return 'flex-end'
72
+ case 'center':
73
+ default:
74
+ return 'center'
75
+ }
76
+ }
77
+
78
+ render() {
79
+ const fontSize = this.inputData?.fontSize ?? 16
80
+ const fontColor = this.inputData?.fontColor || this.themeTextColor || 'inherit'
81
+ const fontWeight = this.inputData?.fontWeight ?? 'normal'
82
+ const fontStyle = this.inputData?.fontStyle ?? 'normal'
83
+ const textAlign = this.inputData?.textAlign ?? 'left'
84
+ const backgroundColor = this.inputData?.backgroundColor || this.themeBgColor || 'transparent'
85
+
86
+ return html`
87
+ <div
88
+ class="wrapper"
89
+ style="
90
+ background-color: ${backgroundColor};
91
+ justify-content: ${textAlign === 'center'
92
+ ? 'center'
93
+ : textAlign === 'right'
94
+ ? 'flex-end'
95
+ : 'flex-start'};
96
+ align-items: ${this.justifyContent()};
97
+ "
98
+ >
99
+ <div
100
+ class="label"
101
+ style="
102
+ font-size: ${fontSize}px;
103
+ color: ${fontColor};
104
+ font-weight: ${fontWeight};
105
+ font-style: ${fontStyle};
106
+ text-align: ${textAlign};
107
+ "
108
+ >
109
+ ${this.inputData?.text ?? ''}
110
+ </div>
111
+ </div>
112
+ `
113
+ }
114
+ }