@telepath-computer/television 0.1.128 → 0.1.142
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/canonical/v1/components.js +83 -0
- package/dist/canonical/v1/styles.css +0 -2
- package/dist/cli.cjs +2092 -6806
- package/dist/onboarding/television-onboarding/assets/television.svg +71 -0
- package/dist/onboarding/television-onboarding/index.html +203 -0
- package/dist/skills/television/SKILL.md +135 -180
- package/dist/skills/{television-calendar → tv-calendar}/SKILL.md +4 -5
- package/dist/skills/{television-table → tv-table}/SKILL.md +1 -1
- package/dist/skills/{television-theme → tv-theme}/SKILL.md +10 -10
- package/dist/views/markdown/index.html +20 -18
- package/dist/web/assets/artifact-bridge-C9leJZpr.js +1 -0
- package/dist/web/assets/clouds-CAYIArXj.jpg +0 -0
- package/dist/web/assets/favicon-DaYMFRha.svg +71 -0
- package/dist/web/assets/main-DxIXVlLQ.css +1 -0
- package/dist/web/assets/main-L9xlsQn4.js +706 -0
- package/dist/web/assets/urlUnsupported-DBXzijdI.js +1 -0
- package/dist/web/index.html +4 -2
- package/dist/web/views/url-unsupported/index.html +97 -0
- package/package.json +1 -1
- package/dist/web/assets/index-BvBbQr_I.js +0 -709
- package/dist/web/assets/index-C__bLj7I.css +0 -1
- package/dist/web/assets/wallpaper-s-ICws44wH.jpg +0 -0
- /package/dist/skills/{television-calendar → tv-calendar}/calendar.css +0 -0
- /package/dist/skills/{television-calendar → tv-calendar}/calendar.js +0 -0
|
@@ -154,4 +154,87 @@ if (!customElements.get("checkbox-list")) {
|
|
|
154
154
|
if (!customElements.get("checkbox-item")) {
|
|
155
155
|
customElements.define("checkbox-item", CheckboxItemElement);
|
|
156
156
|
}
|
|
157
|
+
const DEFAULT_ICON_SIZE = 16;
|
|
158
|
+
const MEDIUM_ICON_SIZE = 24;
|
|
159
|
+
const LARGE_ICON_SIZE = 32;
|
|
160
|
+
const ICONS = {
|
|
161
|
+
plus: {
|
|
162
|
+
regular: `<path d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"/>`,
|
|
163
|
+
bold: `<path d="M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"/>`,
|
|
164
|
+
},
|
|
165
|
+
"subtract-square": {
|
|
166
|
+
regular: `<path d="M224,160V96a8,8,0,0,0-8-8H168V40a8,8,0,0,0-8-8H40a8,8,0,0,0-8,8V160a8,8,0,0,0,8,8H88v48a8,8,0,0,0,8,8H216a8,8,0,0,0,8-8V160Zm-60.69,48-40-40h33.38l40,40ZM168,156.69V123.31l40,40v33.38Zm40-16L171.31,104H208ZM48,48H152v56h0v48H48Zm56,123.31L140.69,208H104Z"/>`,
|
|
167
|
+
duotone: `<path d="M216,96V216H96V160h64V96Z" opacity="0.2"/><path d="M216,88H168V40a8,8,0,0,0-8-8H40a8,8,0,0,0-8,8V160a8,8,0,0,0,8,8H88v48a8,8,0,0,0,8,8H216a8,8,0,0,0,8-8V96A8,8,0,0,0,216,88ZM48,48H152V152H48ZM208,208H104V168h56a8,8,0,0,0,8-8V104h40Z"/>`,
|
|
168
|
+
},
|
|
169
|
+
television: {
|
|
170
|
+
regular: `<path d="M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64ZM40,80H144V200H40ZM216,200H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"/>`,
|
|
171
|
+
},
|
|
172
|
+
"squares-four": {
|
|
173
|
+
regular: `<path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z"/>`,
|
|
174
|
+
duotone: `<path d="M112,56v48a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8h48A8,8,0,0,1,112,56Zm88-8H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V56A8,8,0,0,0,200,48Zm-96,96H56a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,104,144Zm96,0H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,200,144Z" opacity="0.2"/><path d="M200,136H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48ZM104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Z"/>`,
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
const STYLES = `
|
|
178
|
+
:host {
|
|
179
|
+
display: inline-flex;
|
|
180
|
+
width: var(--ui-icon-size, 1em);
|
|
181
|
+
height: var(--ui-icon-size, 1em);
|
|
182
|
+
vertical-align: -0.125em;
|
|
183
|
+
color: var(--ui-icon-color, currentColor);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
svg {
|
|
187
|
+
display: block;
|
|
188
|
+
width: 100%;
|
|
189
|
+
height: 100%;
|
|
190
|
+
fill: currentColor;
|
|
191
|
+
}
|
|
192
|
+
`;
|
|
193
|
+
function isIconName(value) {
|
|
194
|
+
return value === "plus" || value === "subtract-square" || value === "squares-four" || value === "television";
|
|
195
|
+
}
|
|
196
|
+
function isIconWeight(value) {
|
|
197
|
+
return value === "regular" || value === "bold" || value === "duotone";
|
|
198
|
+
}
|
|
199
|
+
export class IconElement extends HTMLElement {
|
|
200
|
+
static observedAttributes = ["name", "weight", "size"];
|
|
201
|
+
#root;
|
|
202
|
+
constructor() {
|
|
203
|
+
super();
|
|
204
|
+
this.#root = this.attachShadow({ mode: "open" });
|
|
205
|
+
}
|
|
206
|
+
connectedCallback() {
|
|
207
|
+
this.#render();
|
|
208
|
+
}
|
|
209
|
+
attributeChangedCallback() {
|
|
210
|
+
this.#render();
|
|
211
|
+
}
|
|
212
|
+
#render() {
|
|
213
|
+
const name = this.#name();
|
|
214
|
+
const weight = this.#weight();
|
|
215
|
+
const size = this.#size();
|
|
216
|
+
const icon = ICONS[name];
|
|
217
|
+
const source = icon[weight] ?? icon.regular;
|
|
218
|
+
this.#root.innerHTML = `
|
|
219
|
+
<style>${STYLES}</style>
|
|
220
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" aria-hidden="true" focusable="false">${source}</svg>
|
|
221
|
+
`;
|
|
222
|
+
this.style.setProperty("--ui-icon-size", `${size}px`);
|
|
223
|
+
}
|
|
224
|
+
#name() {
|
|
225
|
+
const value = this.getAttribute("name");
|
|
226
|
+
return isIconName(value) ? value : "subtract-square";
|
|
227
|
+
}
|
|
228
|
+
#weight() {
|
|
229
|
+
const value = this.getAttribute("weight");
|
|
230
|
+
return isIconWeight(value) ? value : "regular";
|
|
231
|
+
}
|
|
232
|
+
#size() {
|
|
233
|
+
const value = Number(this.getAttribute("size"));
|
|
234
|
+
return value === MEDIUM_ICON_SIZE || value === LARGE_ICON_SIZE ? value : DEFAULT_ICON_SIZE;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
if (!customElements.get("ui-icon")) {
|
|
238
|
+
customElements.define("ui-icon", IconElement);
|
|
239
|
+
}
|
|
157
240
|
|